mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Fix team orders menu not listing clients with lower clientnums
If bots join before the local client (dedicated server) the bots would not be listed in the Q3A team orders menu and so they could not be given orders using the menu. The Q3A team orders menu got local client's team while looping through all clients. Ignoring any bots with clientnum lower than the local client. Get local client's team before the loop so all bots are listed.
This commit is contained in:
parent
34c0722b5e
commit
dc0c3e7bdf
1 changed files with 6 additions and 4 deletions
|
@ -295,7 +295,7 @@ static void UI_TeamOrdersMenu_BuildBotList( void ) {
|
||||||
int numPlayers;
|
int numPlayers;
|
||||||
int isBot;
|
int isBot;
|
||||||
int n;
|
int n;
|
||||||
char playerTeam = '3';
|
char playerTeam;
|
||||||
char botTeam;
|
char botTeam;
|
||||||
char info[MAX_INFO_STRING];
|
char info[MAX_INFO_STRING];
|
||||||
|
|
||||||
|
@ -312,14 +312,16 @@ static void UI_TeamOrdersMenu_BuildBotList( void ) {
|
||||||
numPlayers = atoi( Info_ValueForKey( info, "sv_maxclients" ) );
|
numPlayers = atoi( Info_ValueForKey( info, "sv_maxclients" ) );
|
||||||
teamOrdersMenuInfo.gametype = atoi( Info_ValueForKey( info, "g_gametype" ) );
|
teamOrdersMenuInfo.gametype = atoi( Info_ValueForKey( info, "g_gametype" ) );
|
||||||
|
|
||||||
for( n = 0; n < numPlayers && teamOrdersMenuInfo.numBots < 9; n++ ) {
|
trap_GetConfigString( CS_PLAYERS + cs.clientNum, info, MAX_INFO_STRING );
|
||||||
trap_GetConfigString( CS_PLAYERS + n, info, MAX_INFO_STRING );
|
|
||||||
|
|
||||||
if( n == cs.clientNum ) {
|
|
||||||
playerTeam = *Info_ValueForKey( info, "t" );
|
playerTeam = *Info_ValueForKey( info, "t" );
|
||||||
|
|
||||||
|
for( n = 0; n < numPlayers && teamOrdersMenuInfo.numBots < 9; n++ ) {
|
||||||
|
if( n == cs.clientNum ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
trap_GetConfigString( CS_PLAYERS + n, info, MAX_INFO_STRING );
|
||||||
|
|
||||||
isBot = atoi( Info_ValueForKey( info, "skill" ) );
|
isBot = atoi( Info_ValueForKey( info, "skill" ) );
|
||||||
if( !isBot ) {
|
if( !isBot ) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue