diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index 1995984d2..adbd766e2 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -3458,12 +3458,11 @@ void P_SelectNextInvItem(DukePlayer_t *pPlayer) void P_CheckWeapon(DukePlayer_t *pPlayer) { - int playerNum; - int weaponNum; - - if (pPlayer->reloading) + if (pPlayer->reloading || (unsigned)pPlayer->curr_weapon >= MAX_WEAPONS) return; + int playerNum, weaponNum; + if (pPlayer->wantweaponfire >= 0) { weaponNum = pPlayer->wantweaponfire;