mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2024-11-23 21:12:19 +00:00
Fix Assertion in Engine when shooting Arrows
it was caused by decals of size 0 (when the arrow hits the floor)
This commit is contained in:
parent
cdcb02b26e
commit
b41ce2627c
1 changed files with 4 additions and 1 deletions
|
@ -913,7 +913,10 @@ void idProjectile::DefaultDamageEffect( idEntity *soundEnt, const idDict &projec
|
|||
if ( !projectileDef.GetFloat( va( "size_wound_%s", typeName ), "6.0", size ) ) { // If Material Specific decal size not found, look for default size
|
||||
size = projectileDef.GetFloat( "size_wound", "6.0" );
|
||||
}
|
||||
gameLocal.ProjectDecal( collision.c.point, -collision.c.normal, 8.0f, true, size, decal );
|
||||
|
||||
// decals with size 0 don't make sense and even cause trouble by triggering assertions because the winding ends up broken or sth
|
||||
if(size > 0.0f)
|
||||
gameLocal.ProjectDecal( collision.c.point, -collision.c.normal, 8.0f, true, size, decal );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue