]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
fix crash with non-deluxe
authorrpolzer <rpolzer@61c419a2-8eb2-4b30-bcec-8cead039b335>
Thu, 16 Oct 2008 15:46:12 +0000 (15:46 +0000)
committerrpolzer <rpolzer@61c419a2-8eb2-4b30-bcec-8cead039b335>
Thu, 16 Oct 2008 15:46:12 +0000 (15:46 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@119 61c419a2-8eb2-4b30-bcec-8cead039b335

tools/quake3/q3map2/light_ydnar.c

index 7d288b21c56a1dc66394a599d84759f94a8add41..69f707412c847bd06096f4a30bc4133aa805d394 100644 (file)
@@ -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 );
+                                       }
                                }
                        }
                }