Commit 008bf9ec authored by Richard Gobeille's avatar Richard Gobeille

Duke3d: fix a couple bad comparisons of values against MAX_WEAPONS

The first is something that was missed when the hardcoded World Tour stuff was added, and the second looks like it was just a typo.
parent 320f5341
......@@ -2818,7 +2818,7 @@ CHECKINV1:
if (pPlayer->reloading == 1)
weaponNum = -1;
else if ((uint32_t)weaponNum < MAX_WEAPONS && pPlayer->kickback_pic == 1 && pPlayer->weapon_pos == 1)
else if ((uint32_t)weaponNum < 12 && pPlayer->kickback_pic == 1 && pPlayer->weapon_pos == 1)
{
pPlayer->wantweaponfire = weaponNum;
pPlayer->kickback_pic = 0;
......@@ -2957,8 +2957,7 @@ CHECKINV1:
weaponNum = VM_OnEventWithReturn(EVENT_SELECTWEAPON,pPlayer->i,playerNum, weaponNum);
// XXX: any signifcance to "<= MAX_WEAPONS" instead of "<"?
if ((int32_t)weaponNum != -1 && weaponNum <= MAX_WEAPONS)
if ((int32_t)weaponNum != -1 && weaponNum < MAX_WEAPONS)
{
if (P_CheckDetonatorSpecialCase(pPlayer, weaponNum))
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment