From 91f3f61ead44837b2a9436301b2a4bd181ee2400 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 11 May 2011 04:29:19 +0000 Subject: [PATCH] SVN r3201 (trunk) --- src/p_map.cpp | 2 +- src/thingdef/thingdef_codeptr.cpp | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index 6788ccfb2..ca02e5438 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -4433,7 +4433,7 @@ void P_RadiusAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int b if (!bombdodamage || !(bombspot->flags2 & MF2_NODMGTHRUST)) { - if (bombsource == NULL || !(bombsource->flags2 & MF2_NODMGTHRUST)) + if (bombsource == NULL || !(bombsource->flags2 & MF2_NODMGTHRUST)) { thrust = points * 0.5f / (double)thing->Mass; if (bombsource == thing) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 5ed13311e..3d05b4a18 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -933,11 +933,26 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusThrust) ACTION_PARAM_FIXED(distance, 1); ACTION_PARAM_BOOL(affectSource, 2); + bool sourcenothrust = false; + if (force <= 0) force = 128; if (distance <= 0) distance = force; + // Temporarily negate MF2_NODMGTHRUST on the shooter, since it renders this function useless. + if (self->target != NULL && self->target->flags2 & MF2_NODMGTHRUST) + { + sourcenothrust = true; + self->target->flags2 &= ~MF2_NODMGTHRUST; + } + int sourceflags2 = self->target != NULL ? self->target->flags2 : 0; + P_RadiusAttack (self, self->target, force, distance, self->DamageType, affectSource, false); - P_CheckSplash(self, distance<target->flags2 |= MF2_NODMGTHRUST; + } } //==========================================================================