Added (XF/RADF)_THRUSTLESS.
This flag allows for explosions that do not thrust any of the actors caught in the blast.
This commit is contained in:
parent
357d846b7a
commit
6489b05db9
4 changed files with 16 additions and 7 deletions
|
|
@ -6101,15 +6101,22 @@ int P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bom
|
|||
double thrust;
|
||||
int damage = abs((int)points);
|
||||
int newdam = damage;
|
||||
int dmgmask = 0;
|
||||
|
||||
if (!(flags & RADF_NODAMAGE))
|
||||
{
|
||||
//[inkoalawetrust] Thrustless explosions don't push anything.
|
||||
if (!(flags & RADF_THRUSTLESS))
|
||||
dmgmask = DMG_EXPLOSION;
|
||||
else
|
||||
dmgmask = DMG_EXPLOSION | DMG_THRUSTLESS;
|
||||
|
||||
//[MC] Don't count actors saved by buddha if already at 1 health.
|
||||
int prehealth = thing->health;
|
||||
newdam = P_DamageMobj(thing, bombspot, bombsource, damage, bombmod, DMG_EXPLOSION);
|
||||
newdam = P_DamageMobj(thing, bombspot, bombsource, damage, bombmod, dmgmask);
|
||||
if (thing->health < prehealth) count++;
|
||||
}
|
||||
else if (thing->player == NULL && (!(flags & RADF_NOIMPACTDAMAGE) && !(thing->flags7 & MF7_DONTTHRUST)))
|
||||
else if (thing->player == NULL && (!(flags & RADF_NOIMPACTDAMAGE && !(flags & RADF_THRUSTLESS)) && !(thing->flags7 & MF7_DONTTHRUST)))
|
||||
thing->flags2 |= MF2_BLASTED;
|
||||
|
||||
if (!(thing->flags & MF_ICECORPSE))
|
||||
|
|
@ -6117,13 +6124,12 @@ int P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bom
|
|||
if (!(flags & RADF_NODAMAGE) && !(bombspot->flags3 & MF3_BLOODLESSIMPACT))
|
||||
P_TraceBleed(newdam > 0 ? newdam : damage, thing, bombspot);
|
||||
|
||||
if ((flags & RADF_NODAMAGE) || !(bombspot->flags2 & MF2_NODMGTHRUST))
|
||||
if ((flags & RADF_NODAMAGE && !(flags & RADF_THRUSTLESS)) || !(bombspot->flags2 & MF2_NODMGTHRUST) && !(flags & RADF_THRUSTLESS))
|
||||
{
|
||||
if (bombsource == NULL || !(bombsource->flags2 & MF2_NODMGTHRUST))
|
||||
{
|
||||
if (!(thing->flags7 & MF7_DONTTHRUST))
|
||||
{
|
||||
|
||||
thrust = points * 0.5 / (double)thing->Mass;
|
||||
if (bombsource == thing)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue