In botlib_spawn.c:2157, a dedicated function for managing bot counts in training mode is defined as a static function but is never called:
static void BOTLIB_TrainingBotCountManager(void) // never called
The bot management dispatch at line 2279-2291 handles training mode (line 2283) with inline logic instead:
} else if (training->value) {
if (bot_connections.total_bots != num_bot_spawns) {
BOTLIB_RemoveBot("ALL");
BOTLIB_BotCountManager(num_bot_spawns);
}
}
The dedicated function contains additional logic (bot_playercount-based scaling) that is bypassed entirely. As a result, the bot_playercount cvar has no effect in training mode.
The compiler confirms: warning: unused function 'BOTLIB_TrainingBotCountManager'
Fix: Replace the inline training mode block with a call to BOTLIB_TrainingBotCountManager(), or remove the dead function if the inline logic is intentional.
Location: src/action/botlib/botlib_spawn.c:2157 and 2283
In botlib_spawn.c:2157, a dedicated function for managing bot counts in training mode is defined as a static function but is never called:
static void BOTLIB_TrainingBotCountManager(void) // never called
The bot management dispatch at line 2279-2291 handles training mode (line 2283) with inline logic instead:
} else if (training->value) {
if (bot_connections.total_bots != num_bot_spawns) {
BOTLIB_RemoveBot("ALL");
BOTLIB_BotCountManager(num_bot_spawns);
}
}
The dedicated function contains additional logic (bot_playercount-based scaling) that is bypassed entirely. As a result, the bot_playercount cvar has no effect in training mode.
The compiler confirms: warning: unused function 'BOTLIB_TrainingBotCountManager'
Fix: Replace the inline training mode block with a call to BOTLIB_TrainingBotCountManager(), or remove the dead function if the inline logic is intentional.
Location: src/action/botlib/botlib_spawn.c:2157 and 2283