From: terencehill Date: Tue, 23 Jan 2018 15:27:41 +0000 (+0100) Subject: After the end of the match all bots stay unless all human players disconnect; it... X-Git-Tag: xonotic-v0.8.5~2371 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d2163b1e2717bbb98096db66356f8cf2e122bdfc;p=xonotic%2Fxonotic-data.pk3dir.git After the end of the match all bots stay unless all human players disconnect; it fixes #1967 --- 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;