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 ();