small fix by jal regarding normal vectors from lighting
authorRudolf Polzer <rpolzer@grawp.div0.qc.to>
Sun, 14 Feb 2010 19:09:15 +0000 (20:09 +0100)
committerRudolf Polzer <rpolzer@grawp.div0.qc.to>
Sun, 14 Feb 2010 19:09:15 +0000 (20:09 +0100)
tools/quake3/q3map2/light_ydnar.c

index 4b02805986fe1ca18adf74597a732676d2a09c0e..3207928b71364061914a3905801fe655e4126b39 100644 (file)
@@ -1425,7 +1425,7 @@ float DirtForSample( trace_t *trace )
        VectorCopy( trace->normal, normal );
        
        /* check if the normal is aligned to the world-up */
-       if( normal[ 0 ] == 0.0f && normal[ 1 ] == 0.0f )
+       if( normal[ 0 ] == 0.0f && normal[ 1 ] == 0.0f && ( normal[ 2 ] == 1.0f || normal[ 2 ] == -1.0f ) )
        {
                if( normal[ 2 ] == 1.0f )               
                {