From bde58c1edd4fb2b71c2b7e4308f609918076fa30 Mon Sep 17 00:00:00 2001 From: divverent Date: Sun, 26 Apr 2009 19:05:49 +0000 Subject: [PATCH] simplify shader decision logic in MiniMapSetupBrushes git-svn-id: svn://svn.icculus.org/netradiant/trunk@335 61c419a2-8eb2-4b30-bcec-8cead039b335 --- tools/quake3/q3map2/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/quake3/q3map2/main.c b/tools/quake3/q3map2/main.c index 2c969863..4dfa4151 100644 --- a/tools/quake3/q3map2/main.c +++ b/tools/quake3/q3map2/main.c @@ -374,6 +374,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++ ) @@ -390,6 +391,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 )