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:
Daniel Gibson 2018-09-02 01:17:57 +02:00
parent aa0e2268bc
commit 351a1744a7

View file

@ -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 );
}
}