Added RTF_THRUSTZ for A_RadiusThrust.

- Allows thrusting with Z velocity.
This commit is contained in:
MajorCooke 2016-05-11 06:59:11 -05:00 committed by Christoph Oelckers
parent 852ed6cd04
commit 952219a018
4 changed files with 8 additions and 4 deletions

View file

@ -343,6 +343,7 @@ enum
RADF_NOIMPACTDAMAGE = 2,
RADF_SOURCEISSPOT = 4,
RADF_NODAMAGE = 8,
RADF_THRUSTZ = 16,
};
void P_RadiusAttack (AActor *spot, AActor *source, int damage, int distance,
FName damageType, int flags, int fulldamagedistance=0);

View file

@ -5321,7 +5321,7 @@ void P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bo
vz *= 0.8;
}
thing->Thrust(bombspot->AngleTo(thing), thrust);
if (!(flags & RADF_NODAMAGE))
if (!(flags & RADF_NODAMAGE) || (flags & RADF_THRUSTZ))
thing->Vel.Z += vz; // this really doesn't work well
}
}

View file

@ -1143,9 +1143,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Explode)
enum
{
RTF_AFFECTSOURCE = 1,
RTF_NOIMPACTDAMAGE = 2,
RTF_NOTMISSILE = 4,
RTF_AFFECTSOURCE = 1,
RTF_NOIMPACTDAMAGE = 2,
RTF_NOTMISSILE = 4,
RTF_THRUSTZ = 8,
};
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusThrust)
@ -1167,6 +1168,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusThrust)
sourcenothrust = true;
self->target->flags2 &= ~MF2_NODMGTHRUST;
}
if (flags & RTF_THRUSTZ) flags |= RADF_THRUSTZ;
P_RadiusAttack (self, self->target, force, distance, self->DamageType, flags | RADF_NODAMAGE, fullthrustdistance);
P_CheckSplash(self, distance);

View file

@ -178,6 +178,7 @@ const int XF_NOTMISSILE = 4;
const int RTF_AFFECTSOURCE = 1;
const int RTF_NOIMPACTDAMAGE = 2;
const int RTF_NOTMISSILE = 4;
const int RTF_THRUSTZ = 8;
// Flags for A_Blast
const int BF_USEAMMO = 1;