diff --git a/src/playsim/p_local.h b/src/playsim/p_local.h index e1fae8d62..15716d8df 100644 --- a/src/playsim/p_local.h +++ b/src/playsim/p_local.h @@ -406,7 +406,8 @@ enum RADF_SOURCEISSPOT = 4, RADF_NODAMAGE = 8, RADF_THRUSTZ = 16, - RADF_OLDRADIUSDAMAGE = 32 + RADF_OLDRADIUSDAMAGE = 32, + RADF_THRUSTLESS = 64 }; 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 0ec9b6863..231259a25 100644 --- a/src/playsim/p_map.cpp +++ b/src/playsim/p_map.cpp @@ -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) { diff --git a/wadsrc/static/zscript/actors/attacks.zs b/wadsrc/static/zscript/actors/attacks.zs index edefdd24f..5d8db28bf 100644 --- a/wadsrc/static/zscript/actors/attacks.zs +++ b/wadsrc/static/zscript/actors/attacks.zs @@ -606,6 +606,7 @@ extend class Actor if (flags & XF_HURTSOURCE) pflags |= RADF_HURTSOURCE; if (flags & XF_NOTMISSILE) pflags |= RADF_SOURCEISSPOT; if (flags & XF_THRUSTZ) pflags |= RADF_THRUSTZ; + if (flags & XF_THRUSTLESS) pflags |= RADF_THRUSTLESS; 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 fe44f2c3d..e89fe964a 100644 --- a/wadsrc/static/zscript/constants.zs +++ b/wadsrc/static/zscript/constants.zs @@ -261,7 +261,7 @@ enum EExplodeFlags XF_EXPLICITDAMAGETYPE = 8, XF_NOSPLASH = 16, XF_THRUSTZ = 32, - + XF_THRUSTLESS = 64, }; // Flags for A_RadiusThrust @@ -1227,7 +1227,8 @@ enum RadiusDamageFlags RADF_SOURCEISSPOT = 4, RADF_NODAMAGE = 8, RADF_THRUSTZ = 16, - RADF_OLDRADIUSDAMAGE = 32 + RADF_OLDRADIUSDAMAGE = 32, + RADF_THRUSTLESS = 64 }; enum IntermissionSequenceType