From d2163b1e2717bbb98096db66356f8cf2e122bdfc Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 23 Jan 2018 16:27:41 +0100 Subject: [PATCH] After the end of the match all bots stay unless all human players disconnect; it fixes #1967 --- qcsrc/server/bot/default/bot.qc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/qcsrc/server/bot/default/bot.qc b/qcsrc/server/bot/default/bot.qc index 9eae91d85..a605fc068 100644 --- a/qcsrc/server/bot/default/bot.qc +++ b/qcsrc/server/bot/default/bot.qc @@ -679,6 +679,19 @@ void bot_clear(entity this) void bot_serverframe() { + if (intermission_running && currentbots > 0) + { + // after the end of the match all bots stay unless all human players disconnect + int realplayers = 0; + FOREACH_CLIENT(IS_REAL_CLIENT(it), { ++realplayers; }); + if (!realplayers) + { + FOREACH_CLIENT(IS_BOT_CLIENT(it), { dropclient(it); }); + currentbots = 0; + } + return; + } + if (game_stopped) return; -- 2.39.2