- fixed: P_RadiusAttack should not call P_DamageMobj for a damage value of 0.

This could happen if the damage calculations resulted in a value between 0 and 1, which for the actual check was multiplied with the damage parameter of P_RadiusAttack which inflated the fractional value to something that looked like actual damage but was later truncated.
This commit is contained in:
Christoph Oelckers 2016-04-03 22:45:54 +02:00
parent 6d441e25db
commit 1011e26eb9

View file

@ -5363,7 +5363,7 @@ void P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bo
points *= thing->GetClass()->RDFactor / (float)FRACUNIT;
// points and bombdamage should be the same sign
if (((points * bombdamage) > 0) && P_CheckSight(thing, bombspot, SF_IGNOREVISIBILITY | SF_IGNOREWATERBOUNDARY))
if (((int(points) * bombdamage) > 0) && P_CheckSight(thing, bombspot, SF_IGNOREVISIBILITY | SF_IGNOREWATERBOUNDARY))
{ // OK to damage; target is in direct path
double vz;
double thrust;