]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/light_ydnar.c
gcc: appease the hardening warnings
[xonotic/netradiant.git] / tools / quake3 / q3map2 / light_ydnar.c
index a6def14219b139e5263b7f93768bc1b7abc736e0..f75810bdf00915c3d498d02e2204e6a8431efb2d 100644 (file)
@@ -34,6 +34,7 @@
 
 
 /* dependencies */
+#include <assert.h>
 #include "q3map2.h"
 
 
@@ -1719,7 +1720,7 @@ void DirtyRawLightmap( int rawLightmapNum ){
 
 static qboolean SubmapRawLuxel( rawLightmap_t *lm, int x, int y, float bx, float by, int *sampleCluster, vec3_t sampleOrigin, vec3_t sampleNormal ){
        int i, *cluster, *cluster2;
-       float       *origin, *origin2, *normal; //%     , *normal2;
+       float       *origin = NULL, *origin2 = NULL, *normal; //%       , *normal2;
        vec3_t originVecs[ 2 ];                 //%     , normalVecs[ 2 ];
 
 
@@ -1742,6 +1743,7 @@ static qboolean SubmapRawLuxel( rawLightmap_t *lm, int x, int y, float bx, float
        }
        else {
                Sys_FPrintf( SYS_WRN, "WARNING: Spurious lightmap S vector\n" );
+               assert(0);
        }
 
        VectorSubtract( origin2, origin, originVecs[ 0 ] );
@@ -1766,6 +1768,7 @@ static qboolean SubmapRawLuxel( rawLightmap_t *lm, int x, int y, float bx, float
        }
        else {
                Sys_FPrintf( SYS_WRN, "WARNING: Spurious lightmap T vector\n" );
+               assert(0);
        }
 
        VectorSubtract( origin2, origin, originVecs[ 1 ] );
@@ -3616,7 +3619,7 @@ void SetupEnvelopes( qboolean forGrid, qboolean fastFlag ){
                                else{
                                        light->flags &= ~LIGHT_FAST_TEMP;
                                }
-                               if ( fastpoint && ( light->flags != EMIT_AREA ) ) {
+                               if ( fastpoint && ( light->type != EMIT_AREA ) ) {
                                        light->flags |= LIGHT_FAST_TEMP;
                                }
                                if ( light->si && light->si->noFast ) {