Skip to content

Commit

Permalink
- fixed A_FireCGun.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Mar 11, 2020
1 parent a638cfb commit 4201c4f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions wadsrc/static/zscript/actors/doom/weaponchaingun.zs
Expand Up @@ -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 ();
Expand Down

0 comments on commit 4201c4f

Please sign in to comment.