From 4201c4fbb579637356180d5838410b607ea158e3 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 11 Mar 2020 19:47:23 +0100 Subject: [PATCH] - fixed A_FireCGun. --- wadsrc/static/zscript/actors/doom/weaponchaingun.zs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wadsrc/static/zscript/actors/doom/weaponchaingun.zs b/wadsrc/static/zscript/actors/doom/weaponchaingun.zs index 267977e0d..58a450688 100644 --- a/wadsrc/static/zscript/actors/doom/weaponchaingun.zs +++ b/wadsrc/static/zscript/actors/doom/weaponchaingun.zs @@ -71,9 +71,12 @@ extend class StateProvider // Removed most of the mess that was here in the C++ code because SetSafeFlash already does some thorough validation. State atk = weap.FindState('Fire'); let psp = player.GetPSprite(PSP_WEAPON); - if (psp) State cur = psp.CurState; - int theflash = atk == cur? 0:1; - player.SetSafeFlash(weap, flash, theflash); + if (psp) + { + State cur = psp.CurState; + int theflash = atk == cur? 0:1; + player.SetSafeFlash(weap, flash, theflash); + } } } player.mo.PlayAttacking2 ();