diff --git a/src/playsim/p_local.h b/src/playsim/p_local.h index 15716d8df2..104ca97c30 100644 --- a/src/playsim/p_local.h +++ b/src/playsim/p_local.h @@ -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, diff --git a/src/playsim/p_map.cpp b/src/playsim/p_map.cpp index 231259a252..32dd718d1c 100644 --- a/src/playsim/p_map.cpp +++ b/src/playsim/p_map.cpp @@ -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; diff --git a/wadsrc/static/zscript/actors/attacks.zs b/wadsrc/static/zscript/actors/attacks.zs index 5d8db28bfc..0baa6acb0e 100644 --- a/wadsrc/static/zscript/actors/attacks.zs +++ b/wadsrc/static/zscript/actors/attacks.zs @@ -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); diff --git a/wadsrc/static/zscript/constants.zs b/wadsrc/static/zscript/constants.zs index e89fe964ad..d2690c8171 100644 --- a/wadsrc/static/zscript/constants.zs +++ b/wadsrc/static/zscript/constants.zs @@ -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