mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Exhumed: Repair signedness issue with weapon change code.
* Never revealed itself when I was cheating to get weapons. * Fixes #898
This commit is contained in:
parent
c6054595d0
commit
2bc6df7678
1 changed files with 3 additions and 5 deletions
|
@ -1511,12 +1511,10 @@ static void updatePlayerAction(Player* const pPlayer)
|
|||
pPlayer->bIsFiring = !!(pPlayer->input.actions & SB_FIRE);
|
||||
|
||||
// Handle player pressing number keys to change weapon
|
||||
if (auto newWeap = pPlayer->input.getNewWeapon())
|
||||
const unsigned newWeap = pPlayer->input.getNewWeapon() - 1;
|
||||
if (pPlayer->nPlayerWeapons & (1 << newWeap))
|
||||
{
|
||||
if (pPlayer->nPlayerWeapons & (1 << (newWeap--)))
|
||||
{
|
||||
SetNewWeapon(pPlayer->nPlayer, newWeap);
|
||||
}
|
||||
SetNewWeapon(pPlayer->nPlayer, newWeap);
|
||||
}
|
||||
}
|
||||
else // player is mummified
|
||||
|
|
Loading…
Reference in a new issue