From 03dc2d8c7d07c9cbea37589d4aed3d2a865dcefa Mon Sep 17 00:00:00 2001 From: Marisa the Magician Date: Fri, 30 Dec 2022 23:30:52 +0100 Subject: [PATCH] Fix for rare Quadravol crash corner case. --- language.version | 4 ++-- zscript/dlc1/swwm_notashotgun_fx.zsc | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/language.version b/language.version index f35a8abf5..df4489aa9 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r721 \cu(Fri 30 Dec 23:16:36 CET 2022)\c-"; -SWWM_SHORTVER="\cw1.3pre r721 \cu(2022-12-30 23:16:36)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r722 \cu(Fri 30 Dec 23:30:52 CET 2022)\c-"; +SWWM_SHORTVER="\cw1.3pre r722 \cu(2022-12-30 23:30:52)\c-"; diff --git a/zscript/dlc1/swwm_notashotgun_fx.zsc b/zscript/dlc1/swwm_notashotgun_fx.zsc index 6cc2332c3..17ba845cc 100644 --- a/zscript/dlc1/swwm_notashotgun_fx.zsc +++ b/zscript/dlc1/swwm_notashotgun_fx.zsc @@ -983,6 +983,12 @@ Class OnFire : Inventory } // damage nearby actors if ( amount > 0 ) SWWMUtility.DoExplosion(Owner,amount,0,Owner.radius+40+amount/5,Owner.radius+20,DE_NOBLEED|DE_NOSPLASH|DE_HOWL|DE_CENTERHEIGHT|DE_NONEXPLOSIVE,'Fire',null,DMG_THRUSTLESS,instigator,self); + // in rare cases the owner may stop existing after the DoExplosion call + if ( !Owner ) + { + Destroy(); + return; + } } double mult = max(Owner.radius,Owner.height)/30.; if ( lite ) lite.A_SoundVolume(CHAN_VOICE,min(1.,mult*amount/80.));