mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-27 22:42:57 +00:00
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:
parent
8f5683e23d
commit
3817bed0b3
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue