]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/light_ydnar.c
Remove -Wno-sign-compare
[xonotic/netradiant.git] / tools / quake3 / q3map2 / light_ydnar.c
index c9107407e3cf9c6c0b97c6f0a7e9c68d116521b8..b63d14b233f1cab25b55488ce1beb260473e0014 100644 (file)
@@ -1492,6 +1492,7 @@ float DirtForSample( trace_t *trace ){
                        /* set endpoint */
                        VectorMA( trace->origin, dirtDepth, direction, trace->end );
                        SetupTrace( trace );
+                       VectorSet(trace->color, 1.0f, 1.0f, 1.0f);
 
                        /* trace */
                        TraceLine( trace );
@@ -1514,6 +1515,7 @@ float DirtForSample( trace_t *trace ){
                        /* set endpoint */
                        VectorMA( trace->origin, dirtDepth, direction, trace->end );
                        SetupTrace( trace );
+                       VectorSet(trace->color, 1.0f, 1.0f, 1.0f);
 
                        /* trace */
                        TraceLine( trace );
@@ -1527,6 +1529,7 @@ float DirtForSample( trace_t *trace ){
        /* direct ray */
        VectorMA( trace->origin, dirtDepth, normal, trace->end );
        SetupTrace( trace );
+       VectorSet(trace->color, 1.0f, 1.0f, 1.0f);
 
        /* trace */
        TraceLine( trace );
@@ -1737,9 +1740,8 @@ static qboolean SubmapRawLuxel( rawLightmap_t *lm, int x, int y, float bx, float
                origin2 = SUPER_ORIGIN( x, y );
                //%     normal2 = SUPER_NORMAL( x, y );
        }
-       else
-       {
-               Error( "Spurious lightmap S vector\n" );
+       else{
+               Sys_FPrintf( SYS_WRN, "WARNING: Spurious lightmap S vector\n" );
        }
 
        VectorSubtract( origin2, origin, originVecs[ 0 ] );
@@ -1763,7 +1765,7 @@ static qboolean SubmapRawLuxel( rawLightmap_t *lm, int x, int y, float bx, float
                //%     normal2 = SUPER_NORMAL( x, y );
        }
        else{
-               Sys_Printf( "WARNING: Spurious lightmap T vector\n" );
+               Sys_FPrintf( SYS_WRN, "WARNING: Spurious lightmap T vector\n" );
        }
 
        VectorSubtract( origin2, origin, originVecs[ 1 ] );
@@ -2193,7 +2195,7 @@ void IlluminateRawLightmap( int rawLightmapNum ){
 
                        /* max of MAX_LIGHTMAPS (4) styles allowed to hit a surface/lightmap */
                        if ( lightmapNum >= MAX_LIGHTMAPS ) {
-                               Sys_Printf( "WARNING: Hit per-surface style limit (%d)\n", MAX_LIGHTMAPS );
+                               Sys_FPrintf( SYS_WRN, "WARNING: Hit per-surface style limit (%d)\n", MAX_LIGHTMAPS );
                                continue;
                        }
 
@@ -2213,7 +2215,7 @@ void IlluminateRawLightmap( int rawLightmapNum ){
                        }
 
                        /* set luxel filter radius */
-                       luxelFilterRadius = superSample * filterRadius / lm->sampleSize;
+                       luxelFilterRadius = lm->sampleSize != 0 ? superSample * filterRadius / lm->sampleSize : 0;
                        if ( luxelFilterRadius == 0 && ( filterRadius > 0.0f || filter ) ) {
                                luxelFilterRadius = 1;
                        }
@@ -3181,7 +3183,7 @@ void IlluminateVertexes( int num ){
    determines opaque brushes in the world and find sky shaders for sunlight calculations
  */
 
-void SetupBrushesFlags( int mask_any, int test_any, int mask_all, int test_all ){
+void SetupBrushesFlags( unsigned int mask_any, unsigned int test_any, unsigned int mask_all, unsigned int test_all ){
        int i, j, b;
        unsigned int compileFlags, allCompileFlags;
        qboolean inside;
@@ -3792,7 +3794,7 @@ void SetupEnvelopes( qboolean forGrid, qboolean fastFlag ){
                                        for ( i = 0; i < 3; i++ )
                                        {
                                                if ( mins[ i ] > light->origin[ i ] || maxs[ i ] < light->origin[ i ] ) {
-                                                       //% Sys_Printf( "WARNING: Light PVS bounds (%.0f, %.0f, %.0f) -> (%.0f, %.0f, %.0f)\ndo not encompass light %d (%f, %f, %f)\n",
+                                                       //% Sys_FPrintf( SYS_WRN, "WARNING: Light PVS bounds (%.0f, %.0f, %.0f) -> (%.0f, %.0f, %.0f)\ndo not encompass light %d (%f, %f, %f)\n",
                                                        //%     mins[ 0 ], mins[ 1 ], mins[ 2 ],
                                                        //%     maxs[ 0 ], maxs[ 1 ], maxs[ 2 ],
                                                        //%     numLights, light->origin[ 0 ], light->origin[ 1 ], light->origin[ 2 ] );
@@ -4248,6 +4250,7 @@ float FloodLightForSample( trace_t *trace, float floodLightDistance, qboolean fl
                        //VectorMA( trace->origin, 1, direction, trace->origin );
 
                        SetupTrace( trace );
+                       VectorSet(trace->color, 1.0f, 1.0f, 1.0f);
                        /* trace */
                        TraceLine( trace );
                        contribution = 1;