mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-03-22 19:01:12 +00:00
Added (XF/RADF)_NOALLIES.
This flag allows explosions to not harm any actors that are friendly to its' source.
This commit is contained in:
parent
6489b05db9
commit
ca1f3ac580
4 changed files with 11 additions and 5 deletions
|
@ -407,7 +407,8 @@ enum
|
|||
RADF_NODAMAGE = 8,
|
||||
RADF_THRUSTZ = 16,
|
||||
RADF_OLDRADIUSDAMAGE = 32,
|
||||
RADF_THRUSTLESS = 64
|
||||
RADF_THRUSTLESS = 64,
|
||||
RADF_NOALLIES = 128
|
||||
};
|
||||
int P_GetRadiusDamage(AActor *self, AActor *thing, int damage, int distance, int fulldmgdistance, bool oldradiusdmg);
|
||||
int P_RadiusAttack (AActor *spot, AActor *source, int damage, int distance,
|
||||
|
|
|
@ -6072,10 +6072,12 @@ int P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bom
|
|||
)
|
||||
) continue;
|
||||
|
||||
if((species != NAME_None) && (thing->Species != species))
|
||||
{
|
||||
if ((species != NAME_None) && (thing->Species != species))
|
||||
continue;
|
||||
|
||||
//[inkoalawetrust] Don't harm actors friendly to the explosions' source.
|
||||
if ((flags & RADF_NOALLIES) && bombsource->IsFriend(thing))
|
||||
continue;
|
||||
}
|
||||
|
||||
if (bombsource && thing != bombsource && bombsource->player && P_ShouldPassThroughPlayer(bombsource, thing))
|
||||
continue;
|
||||
|
|
|
@ -607,6 +607,7 @@ extend class Actor
|
|||
if (flags & XF_NOTMISSILE) pflags |= RADF_SOURCEISSPOT;
|
||||
if (flags & XF_THRUSTZ) pflags |= RADF_THRUSTZ;
|
||||
if (flags & XF_THRUSTLESS) pflags |= RADF_THRUSTLESS;
|
||||
if (flags & XF_NOALLIES) pflags |= RADF_NOALLIES;
|
||||
|
||||
int count = RadiusAttack (target, damage, distance, damagetype, pflags, fulldamagedistance);
|
||||
if (!(flags & XF_NOSPLASH)) CheckSplash(distance);
|
||||
|
|
|
@ -262,6 +262,7 @@ enum EExplodeFlags
|
|||
XF_NOSPLASH = 16,
|
||||
XF_THRUSTZ = 32,
|
||||
XF_THRUSTLESS = 64,
|
||||
XF_NOALLIES = 128,
|
||||
};
|
||||
|
||||
// Flags for A_RadiusThrust
|
||||
|
@ -1228,7 +1229,8 @@ enum RadiusDamageFlags
|
|||
RADF_NODAMAGE = 8,
|
||||
RADF_THRUSTZ = 16,
|
||||
RADF_OLDRADIUSDAMAGE = 32,
|
||||
RADF_THRUSTLESS = 64
|
||||
RADF_THRUSTLESS = 64,
|
||||
RADF_NOALLIES = 128
|
||||
};
|
||||
|
||||
enum IntermissionSequenceType
|
||||
|
|
Loading…
Reference in a new issue