- Allow negative force for A_RadiusThrust.

SVN r4187 (trunk)
This commit is contained in:
Randy Heit 2013-03-20 02:41:59 +00:00
commit de20936b13
2 changed files with 6 additions and 6 deletions

View file

@ -4478,7 +4478,7 @@ void P_RadiusAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int b
AActor *thing;
if (flags & RADF_SOURCEISSPOT)
{ // The source is actually the same as the spot, even if that wasn't what we receized.
{ // The source is actually the same as the spot, even if that wasn't what we received.
bombsource = bombspot;
}
@ -4567,11 +4567,12 @@ void P_RadiusAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int b
}
points *= thing->GetClass()->Meta.GetMetaFixed(AMETA_RDFactor, FRACUNIT)/(double)FRACUNIT;
if (points > 0.f && P_CheckSight (thing, bombspot, SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY))
// points and bombdamage should be the same sign
if ((points * bombdamage) > 0 && P_CheckSight (thing, bombspot, SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY))
{ // OK to damage; target is in direct path
double velz;
double thrust;
int damage = (int)points;
int damage = abs((int)points);
int newdam = damage;
if (!(flags & RADF_NODAMAGE))