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

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