[ioquake3] 12/50: Fix random bot not looking for bots by funname

Simon McVittie smcv at debian.org
Sun Jul 23 21:55:22 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository ioquake3.

commit 51649695a56c86333113991458318d450935ec2b
Author: Zack Middleton <zack at cloemail.com>
Date:   Thu Jun 29 15:37:02 2017 -0500

    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 3b1e011..4d3eb61 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;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git



More information about the Pkg-games-commits mailing list