mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
Added RTF_THRUSTZ for A_RadiusThrust.
- Allows thrusting with Z velocity.
This commit is contained in:
parent
852ed6cd04
commit
952219a018
4 changed files with 8 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue