Weap scroll could sometimes miss sameslot weapons

In rear cases, when using next/prevweap, defined weapons in the same
slot couldn't cycle when looping to another when you only had weapons in
1 slot.
This commit is contained in:
Edward Richardson 2014-06-01 18:11:50 +12:00
parent 8f5683e23d
commit 3817bed0b3

View file

@ -1143,7 +1143,7 @@ AWeapon *FWeaponSlots::PickNextWeapon(player_t *player)
return weap; return weap;
} }
} }
while ((slot != startslot || index != startindex) && slotschecked < NUM_WEAPON_SLOTS); while ((slot != startslot || index != startindex) && slotschecked <= NUM_WEAPON_SLOTS);
} }
return player->ReadyWeapon; return player->ReadyWeapon;
} }
@ -1198,7 +1198,7 @@ AWeapon *FWeaponSlots::PickPrevWeapon (player_t *player)
return weap; return weap;
} }
} }
while ((slot != startslot || index != startindex) && slotschecked < NUM_WEAPON_SLOTS); while ((slot != startslot || index != startindex) && slotschecked <= NUM_WEAPON_SLOTS);
} }
return player->ReadyWeapon; return player->ReadyWeapon;
} }