Fix random bot not looking for bots by funname

Quake 3's Anarki bot has a 'funname' with colors in it.
This commit fixes Anarki not being detected as in use.
This commit is contained in:
Zack Middleton 2017-06-29 15:37:02 -05:00
parent 23a331c9f8
commit 51649695a5
1 changed files with 4 additions and 1 deletions

View File

@ -273,7 +273,10 @@ int G_SelectRandomBotInfo( int team ) {
num = 0; num = 0;
for ( n = 0; n < g_numBots ; n++ ) { for ( n = 0; n < g_numBots ; n++ ) {
value = Info_ValueForKey( g_botInfos[n], "name" ); value = Info_ValueForKey( g_botInfos[n], "funname" );
if ( !value[0] ) {
value = Info_ValueForKey( g_botInfos[n], "name" );
}
// //
if ( G_CountBotPlayersByName( value, team ) == 0 ) { if ( G_CountBotPlayersByName( value, team ) == 0 ) {
selection[num++] = n; selection[num++] = n;