From 35613f0860a2d8cb643ca8de006de08503e48e53 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 18 Oct 2008 17:58:45 +0000 Subject: example module --- src/render/draw.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/render') 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()); -- cgit v1.2.3