mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 23:02:01 +00:00
Fix duplicate (delayed) random bots being choosen
Count delayed bots when looking for least used bot infos for deciding which bot to add.
This commit is contained in:
parent
d8f2ff7a4b
commit
0999aff28d
1 changed files with 3 additions and 1 deletions
|
@ -232,6 +232,8 @@ static void PlayerIntroSound( const char *modelAndSkin ) {
|
||||||
===============
|
===============
|
||||||
G_CountBotPlayersByName
|
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.
|
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;
|
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) ) {
|
||||||
|
|
Loading…
Reference in a new issue