mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2024-11-23 13:02:18 +00:00
(Hopefully) fix one of the assertions rarely happening in Rivensen
I hope I guessed this right: This could prevent the rare assertion in RenderWorld.cpp:954 ("bounds[0][0] <= bounds[1][0] && bounds[0][1] <= bounds[1][1] && bounds[0][2] <= bounds[1][2]").
This commit is contained in:
parent
97aa34a2f2
commit
1fe2a59637
1 changed files with 6 additions and 4 deletions
|
@ -3869,15 +3869,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 );
|
||||
|
||||
|
|
Loading…
Reference in a new issue