Skip to content

Commit

Permalink
fix: player can switch hands even when is dead!
Browse files Browse the repository at this point in the history
only when alive you will be able to swap hands sorry
  • Loading branch information
emawind84 committed Mar 15, 2024
1 parent d69cd2a commit 11c8bb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wadsrc/static/zscript/actors/player/player.zs
Original file line number Diff line number Diff line change
Expand Up @@ -2347,7 +2347,7 @@ class PlayerPawn : Actor
virtual void SwitchWeaponHand(int hand = 0)
{
let weap = hand == 0 ? player.OffhandWeapon : player.ReadyWeapon;
if (weap != null && !weap.bNoHandSwitch)
if (weap != null && !weap.bNoHandSwitch && player.playerstate == PST_LIVE)
{
let nextweap = player.mo.PickNextWeapon(1 - hand);
player.OffhandWeapon = player.ReadyWeapon = null;
Expand Down

0 comments on commit 11c8bb2

Please sign in to comment.