Skip to content

Commit

Permalink
- added a null check to CheckWeaponChange.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Aug 12, 2021
1 parent f9f48c4 commit 73f73cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wadsrc/static/zscript/actors/player/player.zs
Expand Up @@ -456,6 +456,7 @@ class PlayerPawn : Actor
virtual void CheckWeaponChange ()
{
let player = self.player;
if (!player) return;
if ((player.WeaponState & WF_DISABLESWITCH) || // Weapon changing has been disabled.
player.morphTics != 0) // Morphed classes cannot change weapons.
{ // ...so throw away any pending weapon requests.
Expand Down

0 comments on commit 73f73cd

Please sign in to comment.