Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-rw-r--r--src/render/draw.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/render/draw.cc b/src/render/draw.cc
index 17c6fac..69dcecb 100644
--- a/src/render/draw.cc
+++ b/src/render/draw.cc
@@ -214,14 +214,19 @@ void draw_pass_sky()
if (!core::localplayer()->zone())
return;
- if (!core::localplayer()->zone()->sky_texture() && core::localplayer()->zone()->sky().size()) {
+ if (!core::localplayer()->zone()->sky().size())
+ return;
+
+ if (!core::localplayer()->zone()->sky_texture()) {
std::string texture_name("textures/env/");
texture_name.append(core::localplayer()->zone()->sky());
core::localplayer()->zone()->set_sky_texture(Textures::load(texture_name));
- if (!core::localplayer()->zone()->sky_texture())
+ if (!core::localplayer()->zone()->sky_texture()) {
core::localplayer()->zone()->set_sky("");
+ return;
+ }
}
Textures::bind(core::localplayer()->zone()->sky_texture());