mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-31 13:00:59 +00:00
- added a null check to CheckWeaponChange.
This commit is contained in:
parent
f9f48c4a95
commit
73f73cdf7c
1 changed files with 1 additions and 0 deletions
|
@ -456,6 +456,7 @@ class PlayerPawn : Actor
|
||||||
virtual void CheckWeaponChange ()
|
virtual void CheckWeaponChange ()
|
||||||
{
|
{
|
||||||
let player = self.player;
|
let player = self.player;
|
||||||
|
if (!player) return;
|
||||||
if ((player.WeaponState & WF_DISABLESWITCH) || // Weapon changing has been disabled.
|
if ((player.WeaponState & WF_DISABLESWITCH) || // Weapon changing has been disabled.
|
||||||
player.morphTics != 0) // Morphed classes cannot change weapons.
|
player.morphTics != 0) // Morphed classes cannot change weapons.
|
||||||
{ // ...so throw away any pending weapon requests.
|
{ // ...so throw away any pending weapon requests.
|
||||||
|
|
Loading…
Reference in a new issue