]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
simplify shader decision logic in MiniMapSetupBrushes
authordivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Sun, 26 Apr 2009 19:05:49 +0000 (19:05 +0000)
committerdivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Sun, 26 Apr 2009 19:05:49 +0000 (19:05 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@335 61c419a2-8eb2-4b30-bcec-8cead039b335

tools/quake3/q3map2/main.c

index e04f8dc6335fceae1f1051cec3be290130a0459e..73c92c608692e2a843e6c57c1b212847035ffa60 100644 (file)
@@ -346,6 +346,7 @@ void MiniMapSetupBrushes( void )
                b = minimap.model->firstBSPBrush + i;
                brush = &bspBrushes[ b ];
                
+#if 0
                /* check all sides */
                compileFlags = 0;
                for( j = 0; j < brush->numSides; j++ )
@@ -362,6 +363,14 @@ void MiniMapSetupBrushes( void )
                        /* or together compile flags */
                        compileFlags |= si->compileFlags;
                }
+#else
+               shader = &bspShaders[ brush->shaderNum ];
+               si = ShaderInfoForShader( shader->shader );
+               if( si == NULL )
+                       compileFlags = 0;
+               else
+                       compileFlags = si->compileFlags;
+#endif
                
                /* determine if this brush is solid */
                if( (compileFlags & (C_SOLID | C_SKY)) == C_SOLID )