mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- Allow negative force for A_RadiusThrust.
SVN r4187 (trunk)
This commit is contained in:
parent
18bf56d3d7
commit
de20936b13
2 changed files with 6 additions and 6 deletions
|
@ -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))
|
||||
|
|
|
@ -838,8 +838,8 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusThrust)
|
|||
|
||||
bool sourcenothrust = false;
|
||||
|
||||
if (force <= 0) force = 128;
|
||||
if (distance <= 0) distance = force;
|
||||
if (force == 0) force = 128;
|
||||
if (distance <= 0) distance = abs(force);
|
||||
|
||||
// Temporarily negate MF2_NODMGTHRUST on the shooter, since it renders this function useless.
|
||||
if (!(flags & RTF_NOTMISSILE) && self->target != NULL && self->target->flags2 & MF2_NODMGTHRUST)
|
||||
|
@ -847,7 +847,6 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusThrust)
|
|||
sourcenothrust = true;
|
||||
self->target->flags2 &= ~MF2_NODMGTHRUST;
|
||||
}
|
||||
int sourceflags2 = self->target != NULL ? self->target->flags2 : 0;
|
||||
|
||||
P_RadiusAttack (self, self->target, force, distance, self->DamageType, flags | RADF_NODAMAGE, fullthrustdistance);
|
||||
P_CheckSplash(self, distance << FRACBITS);
|
||||
|
|
Loading…
Reference in a new issue