Fix for rare Quadravol crash corner case.

This commit is contained in:
Mari the Deer 2022-12-30 23:30:52 +01:00
commit 03dc2d8c7d
2 changed files with 8 additions and 2 deletions

View file

@ -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-";

View file

@ -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.));