- added a null check to CheckWeaponChange.

This commit is contained in:
Christoph Oelckers 2021-08-12 20:28:04 +02:00
parent f9f48c4a95
commit 73f73cdf7c
1 changed files with 1 additions and 0 deletions

View File

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