diff --git a/game/Game_local.cpp b/game/Game_local.cpp index f2d30ef..5edccb8 100644 --- a/game/Game_local.cpp +++ b/game/Game_local.cpp @@ -3835,15 +3835,17 @@ void idGameLocal::ProjectDecal( const idVec3 &origin, const idVec3 &dir, float d idVec3( 1.0f, -1.0f, 0.0f ) }; - if ( !g_decals.GetBool() ) { - return; - } - // DG: with size 0 we get trouble in functions called from this, // and it's harder to figure out the cause there // so just catch this here (so please fix the caller to make sure it doesn't happen) assert(size > 0.0f); + if ( !g_decals.GetBool() || size <= 0.0f ) { + return; + } + + + // randomly rotate the decal winding idMath::SinCos16( ( angle ) ? angle : random.RandomFloat() * idMath::TWO_PI, s, c );