mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- Exhumed: Skip over weapons owned but without ammo when doing WeapSel_Next
/WeapSel_Prev
.
* Fixes #148.
This commit is contained in:
parent
e3c6873410
commit
2d903ed918
1 changed files with 2 additions and 2 deletions
|
@ -403,7 +403,7 @@ void GameInterface::Ticker()
|
|||
if (weap2 == WeaponSel_Next)
|
||||
{
|
||||
auto newWeap = currWeap == 6 ? 0 : currWeap + 1;
|
||||
while (!(nPlayerWeapons[nLocalPlayer] & (1 << newWeap)))
|
||||
while (!(nPlayerWeapons[nLocalPlayer] & (1 << newWeap)) || (nPlayerWeapons[nLocalPlayer] & (1 << newWeap) && PlayerList[nLocalPlayer].nAmmo[newWeap] == 0))
|
||||
{
|
||||
newWeap++;
|
||||
}
|
||||
|
@ -412,7 +412,7 @@ void GameInterface::Ticker()
|
|||
else if (weap2 == WeaponSel_Prev)
|
||||
{
|
||||
auto newWeap = currWeap == 0 ? 6 : currWeap - 1;
|
||||
while (!(nPlayerWeapons[nLocalPlayer] & (1 << newWeap)))
|
||||
while (!(nPlayerWeapons[nLocalPlayer] & (1 << newWeap)) || (nPlayerWeapons[nLocalPlayer] & (1 << newWeap) && PlayerList[nLocalPlayer].nAmmo[newWeap] == 0))
|
||||
{
|
||||
newWeap--;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue