Check delayed bot's team when counting bots for bot_minplayers
note: This requires my previous commit that added teampref userinfo so that bots choose correct team in ClientConnect.
This commit is contained in:
parent
7c601da651
commit
d8f2ff7a4b
1 changed files with 4 additions and 11 deletions
|
@ -387,16 +387,18 @@ int G_CountHumanPlayers( int team ) {
|
||||||
/*
|
/*
|
||||||
===============
|
===============
|
||||||
G_CountBotPlayers
|
G_CountBotPlayers
|
||||||
|
|
||||||
|
Check connected and connecting (delay join) bots.
|
||||||
===============
|
===============
|
||||||
*/
|
*/
|
||||||
int G_CountBotPlayers( int team ) {
|
int G_CountBotPlayers( int team ) {
|
||||||
int i, n, num;
|
int i, num;
|
||||||
gclient_t *cl;
|
gclient_t *cl;
|
||||||
|
|
||||||
num = 0;
|
num = 0;
|
||||||
for ( i=0 ; i< g_maxclients.integer ; i++ ) {
|
for ( i=0 ; i< g_maxclients.integer ; i++ ) {
|
||||||
cl = level.clients + i;
|
cl = level.clients + i;
|
||||||
if ( cl->pers.connected != CON_CONNECTED ) {
|
if ( cl->pers.connected == CON_DISCONNECTED ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ( !(g_entities[i].r.svFlags & SVF_BOT) ) {
|
if ( !(g_entities[i].r.svFlags & SVF_BOT) ) {
|
||||||
|
@ -407,15 +409,6 @@ int G_CountBotPlayers( int team ) {
|
||||||
}
|
}
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
for( n = 0; n < BOT_SPAWN_QUEUE_DEPTH; n++ ) {
|
|
||||||
if( !botSpawnQueue[n].spawnTime ) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ( botSpawnQueue[n].spawnTime > level.time ) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
num++;
|
|
||||||
}
|
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue