Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-10-18 17:58:45 +0000
committerStijn Buys <ingar@osirion.org>2008-10-18 17:58:45 +0000
commit35613f0860a2d8cb643ca8de006de08503e48e53 (patch)
tree8a5436de643e818e68a82df2e5cb2df2145f5062 /src/render
parentdb287e4a5133125bb6f25ba21ea97c47b19ac67f (diff)
example module
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());