From 1f33ba2c4d89c963eb06fa24238b8de9033d3515 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 2 Dec 2018 16:06:04 +0100 Subject: [PATCH] - fixed incomplete null checks in A_RadiusThrust. --- wadsrc/static/zscript/actor_attacks.txt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/wadsrc/static/zscript/actor_attacks.txt b/wadsrc/static/zscript/actor_attacks.txt index 8549048ba..b04b5927f 100644 --- a/wadsrc/static/zscript/actor_attacks.txt +++ b/wadsrc/static/zscript/actor_attacks.txt @@ -616,17 +616,20 @@ extend class Actor { if (force == 0) force = 128; if (distance <= 0) distance = abs(force); + bool nothrust = false; - bool nothrust = target.bNoDamageThrust; - // Temporarily negate MF2_NODMGTHRUST on the shooter, since it renders this function useless. - if (!(flags & RTF_NOTMISSILE) && target != NULL) + if (target) { - target.bNoDamageThrust = false; + nothrust = target.bNoDamageThrust; + // Temporarily negate MF2_NODMGTHRUST on the shooter, since it renders this function useless. + if (!(flags & RTF_NOTMISSILE)) + { + target.bNoDamageThrust = false; + } } - RadiusAttack (target, force, distance, DamageType, flags | RADF_NODAMAGE, fullthrustdistance); CheckSplash(distance); - target.bNoDamageThrust = nothrust; + if (target) target.bNoDamageThrust = nothrust; } //==========================================================================