mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2025-02-18 01:52:21 +00:00
Fix Assertion in Engine when shooting Arrows (from Rivensin)
it was caused by decals of size 0 (when the arrow hits the floor) at least in Rivensin this caused trouble, so it seems likely that it's responsible for some of the reported Dentonmod crashes as well
This commit is contained in:
parent
aa0e2268bc
commit
351a1744a7
1 changed files with 4 additions and 1 deletions
|
@ -754,7 +754,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