From 51649695a56c86333113991458318d450935ec2b Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Thu, 29 Jun 2017 15:37:02 -0500 Subject: [PATCH] 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. --- code/game/g_bot.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/game/g_bot.c b/code/game/g_bot.c index 3b1e0112..4d3eb612 100644 --- a/code/game/g_bot.c +++ b/code/game/g_bot.c @@ -273,7 +273,10 @@ int G_SelectRandomBotInfo( int team ) { num = 0; 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 ) { selection[num++] = n;