]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
HAHA. Fix a bug that prevented ANY non-sRGB builds with the current default build...
authorRudolf Polzer <divverent@xonotic.org>
Tue, 24 Sep 2013 10:45:12 +0000 (12:45 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Tue, 24 Sep 2013 10:45:47 +0000 (12:45 +0200)
tools/quake3/q3map2/light.c
tools/quake3/q3map2/light_bounce.c

index ffcd832a5105f8f5648dc2381706d1c6ab2a506c..a09659795a527a326e7628697a36d20c8881d1fc 100644 (file)
@@ -2343,12 +2343,21 @@ int LightMain( int argc, char **argv ){
                        Sys_Printf( "Colors are linear\n" );
                }
 
-               else if ( !strcmp( argv[ i ], "-nosRGB" ) ) {
+               else if ( !strcmp( argv[ i ], "-sRGB" ) ) {
                        lightmapsRGB = qtrue;
-                       Sys_Printf( "Lighting is linear\n" );
+                       Sys_Printf( "Lighting is in sRGB\n" );
                        texturesRGB = qtrue;
-                       Sys_Printf( "Textures are linear\n" );
+                       Sys_Printf( "Textures are in sRGB\n" );
                        colorsRGB = qtrue;
+                       Sys_Printf( "Colors are in sRGB\n" );
+               }
+
+               else if ( !strcmp( argv[ i ], "-nosRGB" ) ) {
+                       lightmapsRGB = qfalse;
+                       Sys_Printf( "Lighting is linear\n" );
+                       texturesRGB = qfalse;
+                       Sys_Printf( "Textures are linear\n" );
+                       colorsRGB = qfalse;
                        Sys_Printf( "Colors are linear\n" );
                }
 
index f72653ab88fb21f849a820b341e1a6808a6e7931..d91744f0162fc92f27596bd45741310fa4cdd00b 100644 (file)
@@ -551,6 +551,8 @@ static void RadSubdivideDiffuseLight( int lightmapNum, bspDrawSurface_t *ds, raw
 
        /* bouncing light? */
        if ( !bouncing ) {
+               Sys_Printf( "BUG: RadSubdivideDiffuseLight !bouncing shouldn't happen\n" );
+
                /* handle first-pass lights in normal q3a style */
                value = si->value;
                light->photons = value * area * areaScale;
@@ -616,6 +618,9 @@ static void RadSubdivideDiffuseLight( int lightmapNum, bspDrawSurface_t *ds, raw
                light->dist = DotProduct( light->origin, normal );
        }
 
+       if (light->photons < 0 || light->add < 0 || light->color[0] < 0 || light->color[1] < 0 || light->color[2] < 0)
+               Sys_Printf( "BUG: RadSubdivideDiffuseLight created a darkbulb\n" );
+
        /* emit light from both sides? */
        if ( si->compileFlags & C_FOG || si->twoSided ) {
                light->flags |= LIGHT_TWOSIDED;