Make Team Arena prevTeamMember command loop around player list

Team Arena HUD's team member info box can be cycled through using
nextTeamMember and prevTeamMember commands. nextTeamMember command loops
around when end of list is reached but prevTeamMember command got stuck
at last entry in list (team overview).
This commit is contained in:
Zack Middleton 2018-10-17 13:20:16 -05:00
parent 302f12b8f6
commit 09166ba05e

View file

@ -150,7 +150,7 @@ void CG_SelectNextPlayer( void ) {
void CG_SelectPrevPlayer( void ) {
CG_CheckOrderPending();
if (cg_currentSelectedPlayer.integer > 0 && cg_currentSelectedPlayer.integer < numSortedTeamPlayers) {
if (cg_currentSelectedPlayer.integer > 0 && cg_currentSelectedPlayer.integer <= numSortedTeamPlayers) {
cg_currentSelectedPlayer.integer--;
} else {
cg_currentSelectedPlayer.integer = numSortedTeamPlayers;