diff --git a/src/g_hexen/a_blastradius.cpp b/src/g_hexen/a_blastradius.cpp index 6e3b0052b..a78b0b4c8 100644 --- a/src/g_hexen/a_blastradius.cpp +++ b/src/g_hexen/a_blastradius.cpp @@ -22,7 +22,7 @@ // //========================================================================== -void BlastActor (AActor *victim, fixed_t strength, fixed_t speed, AActor * Owner, const PClass * blasteffect) +void BlastActor (AActor *victim, fixed_t strength, fixed_t speed, AActor * Owner, const PClass * blasteffect, bool dontdamage) { angle_t angle,ang; AActor *mo; @@ -67,7 +67,7 @@ void BlastActor (AActor *victim, fixed_t strength, fixed_t speed, AActor * Owner { // Players handled automatically } - else + else if (!dontdamage) { victim->flags2 |= MF2_BLASTED; } @@ -83,6 +83,7 @@ enum BF_USEAMMO = 1, BF_DONTWARN = 2, BF_AFFECTBOSSES = 4, + BF_NOIMPACTDAMAGE = 8, }; //========================================================================== @@ -145,6 +146,6 @@ DEFINE_ACTION_FUNCTION_PARAMS (AActor, A_Blast) { // Out of range continue; } - BlastActor (mo, strength, speed, self, blasteffect); + BlastActor (mo, strength, speed, self, blasteffect, !!(blastflags & BF_NOIMPACTDAMAGE)); } } diff --git a/src/p_local.h b/src/p_local.h index be1697b85..8c43fb89a 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -474,7 +474,7 @@ void P_AimCamera (AActor *t1, fixed_t &x, fixed_t &y, fixed_t &z, sector_t *&sec // [RH] Means of death void P_RadiusAttack (AActor *spot, AActor *source, int damage, int distance, - FName damageType, bool hurtSelf, bool dodamage=true, int fulldamagedistance=0); + FName damageType, bool hurtSelf, bool dodamage=true, int fulldamagedistance=0, bool noimpactdamage=false); void P_DelSector_List(); void P_DelSeclist(msecnode_t *); // phares 3/16/98 diff --git a/src/p_map.cpp b/src/p_map.cpp index 1dc77dad2..30ca5092a 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -4446,7 +4446,7 @@ CUSTOM_CVAR (Float, splashfactor, 1.f, CVAR_SERVERINFO) //========================================================================== void P_RadiusAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int bombdistance, FName bombmod, - bool DamageSource, bool bombdodamage, int fulldamagedistance) + bool DamageSource, bool bombdodamage, int fulldamagedistance, bool noimpactdamage) { if (bombdistance <= 0) return; @@ -4552,7 +4552,7 @@ void P_RadiusAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int b int damage = (int)points; if (bombdodamage) P_DamageMobj (thing, bombspot, bombsource, damage, bombmod); - else if (thing->player == NULL) thing->flags2 |= MF2_BLASTED; + else if (thing->player == NULL && !noimpactdamage) thing->flags2 |= MF2_BLASTED; if (!(thing->flags & MF_ICECORPSE)) { diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 0edbb87bd..6bf18b443 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -776,6 +776,12 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Explode) } } +enum +{ + RTF_AFFECTSOURCE = 1, + RTF_NOIMPACTDAMAGE = 2, +}; + //========================================================================== // // A_RadiusThrust @@ -787,9 +793,12 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusThrust) ACTION_PARAM_START(3); ACTION_PARAM_INT(force, 0); ACTION_PARAM_INT(distance, 1); - ACTION_PARAM_BOOL(affectSource, 2); + ACTION_PARAM_INT(thrustFlags, 2); ACTION_PARAM_INT(fullthrustdistance, 3); + bool affectSource = !!(thrustFlags & RTF_AFFECTSOURCE); + bool noimpactdamage = !!(thrustFlags & RTF_NOIMPACTDAMAGE); + bool sourcenothrust = false; if (force <= 0) force = 128; @@ -803,7 +812,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusThrust) } int sourceflags2 = self->target != NULL ? self->target->flags2 : 0; - P_RadiusAttack (self, self->target, force, distance, self->DamageType, affectSource, false, fullthrustdistance); + P_RadiusAttack (self, self->target, force, distance, self->DamageType, affectSource, false, fullthrustdistance, noimpactdamage); P_CheckSplash(self, distance << FRACBITS); if (sourcenothrust) diff --git a/wadsrc/static/actors/constants.txt b/wadsrc/static/actors/constants.txt index c0ce68c04..9ccac908b 100644 --- a/wadsrc/static/actors/constants.txt +++ b/wadsrc/static/actors/constants.txt @@ -123,10 +123,15 @@ const int MSF_Standard = 0; const int MSF_Classic = 1; const int MSF_DontHurt = 2; +// Flags for A_RadiusThrust +const int RTF_AFFECTSOURCE = 1; +const int RTF_NOIMPACTDAMAGE = 2; + // Flags for A_Blast const int BF_USEAMMO = 1; const int BF_DONTWARN = 2; const int BF_AFFECTBOSSES = 4; +const int BF_NOIMPACTDAMAGE = 8; // Flags for A_SeekerMissile const int SMF_LOOK = 1;