[iortcw] 44/89: All: Fix duplicate (delayed) random bots being choosen

Simon McVittie smcv at debian.org
Fri Sep 8 10:44:24 UTC 2017


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

smcv pushed a commit to tag 1.51b
in repository iortcw.

commit b22b6bacf4a556d2e7bf2dbd4688c3a6dbf8d51a
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date:   Wed Jul 19 12:21:20 2017 -0400

    All: Fix duplicate (delayed) random bots being choosen
---
 MP/code/game/g_bot.c | 4 +++-
 SP/code/game/g_bot.c | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/MP/code/game/g_bot.c b/MP/code/game/g_bot.c
index 4158aae..34b55c4 100644
--- a/MP/code/game/g_bot.c
+++ b/MP/code/game/g_bot.c
@@ -153,6 +153,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.
 ===============
 */
@@ -163,7 +165,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) ) {
diff --git a/SP/code/game/g_bot.c b/SP/code/game/g_bot.c
index b797a57..f13d571 100644
--- a/SP/code/game/g_bot.c
+++ b/SP/code/game/g_bot.c
@@ -154,6 +154,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.
 ===============
 */
@@ -164,7 +166,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/iortcw.git



More information about the Pkg-games-commits mailing list