From 2b24fee53d1d4475c27b57d6d1cc213528015ac0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 11 Dec 2016 12:37:12 +0100 Subject: [PATCH] - fixed: A_BlastRadius accessed the player's ReadyWeapon before ensuring it got called from a player. --- wadsrc/static/zscript/hexen/blastradius.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wadsrc/static/zscript/hexen/blastradius.txt b/wadsrc/static/zscript/hexen/blastradius.txt index a9c631318a..becc9a9bc9 100644 --- a/wadsrc/static/zscript/hexen/blastradius.txt +++ b/wadsrc/static/zscript/hexen/blastradius.txt @@ -103,10 +103,9 @@ extend class Actor action void A_Blast(int blastflags = 0, double strength = 255, double radius = 255, double speed = 20, class blasteffect = "BlastEffect", sound blastsound = "BlastRadius") { - Weapon weapon = player.ReadyWeapon; if (player && (blastflags & BF_USEAMMO) && invoker == weapon && stateinfo != null && stateinfo.mStateType == STATE_Psprite) - { + Weapon weapon = player.ReadyWeapon; if (weapon != null && !weapon.DepleteAmmo(weapon.bAltFire)) { return;