- fixed: A_BlastRadius accessed the player's ReadyWeapon before ensuring it got called from a player.

This commit is contained in:
Christoph Oelckers 2016-12-11 12:37:12 +01:00
parent aa758159c9
commit 2b24fee53d

View file

@ -103,10 +103,9 @@ extend class Actor
action void A_Blast(int blastflags = 0, double strength = 255, double radius = 255, double speed = 20, class<Actor> blasteffect = "BlastEffect", sound blastsound = "BlastRadius")
{
Weapon weapon = player.ReadyWeapon;
if (player && (blastflags & BF_USEAMMO) && invoker == weapon && stateinfo != null && stateinfo.mStateType == STATE_Psprite)
{
Weapon weapon = player.ReadyWeapon;
if (weapon != null && !weapon.DepleteAmmo(weapon.bAltFire))
{
return;