[ioquake3] 16/50: Fix duplicate (delayed) random bots being choosen

Simon McVittie smcv at debian.org
Sun Jul 23 21:55:23 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 0999aff28dbc198b19e38399cc50c468bbbdb0b3
Author: Zack Middleton <zack at cloemail.com>
Date:   Thu Jun 29 17:07:32 2017 -0500

    Fix duplicate (delayed) random bots being choosen
    
    Count delayed bots when looking for least used bot infos for deciding
    which bot to add.
---
 code/game/g_bot.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/code/game/g_bot.c b/code/game/g_bot.c
index 1ec4f68..bda1f7d 100644
--- a/code/game/g_bot.c
+++ b/code/game/g_bot.c
@@ -232,6 +232,8 @@ static void PlayerIntroSound( const char *modelAndSkin ) {
 ===============
 G_CountBotPlayersByName
 
+Check connected and connecting (delay join) bots.
+
 Returns number of bots with name on specified team or whole server if team is -1.
 ===============
 */
@@ -242,7 +244,7 @@ int G_CountBotPlayersByName( const char *name, int team ) {
 	num = 0;
 	for ( i=0 ; i< g_maxclients.integer ; i++ ) {
 		cl = level.clients + i;
-		if ( cl->pers.connected != CON_CONNECTED ) {
+		if ( cl->pers.connected == CON_DISCONNECTED ) {
 			continue;
 		}
 		if ( !(g_entities[i].r.svFlags & SVF_BOT) ) {

-- 
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