From: rpolzer Date: Thu, 16 Oct 2008 15:46:12 +0000 (+0000) Subject: fix crash with non-deluxe X-Git-Tag: svn-r421~301 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=0178f5e7c657aef1052126edde1e3d9c5fa9e35d;p=xonotic%2Fnetradiant.git fix crash with non-deluxe git-svn-id: svn://svn.icculus.org/netradiant/trunk@119 61c419a2-8eb2-4b30-bcec-8cead039b335 --- diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index 7d288b21..69f70741 100644 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@ -2385,10 +2385,13 @@ void IlluminateRawLightmap( int rawLightmapNum ) if (luxel[3]==0) luxel[3]=1; - brightness = flood[ 0 ] * 0.3f + flood[ 1 ] * 0.59f + flood[ 2 ] * 0.11f; - brightness *= (1.0 / 255.0); - VectorScale( normal, brightness, temp ); - VectorAdd( deluxel, temp, deluxel ); + if(deluxemap) + { + brightness = flood[ 0 ] * 0.3f + flood[ 1 ] * 0.59f + flood[ 2 ] * 0.11f; + brightness *= (1.0 / 255.0); + VectorScale( normal, brightness, temp ); + VectorAdd( deluxel, temp, deluxel ); + } } } }