From: terencehill Date: Tue, 28 Feb 2017 15:16:31 +0000 (+0100) Subject: Fix bots occasionally getting stuck when one of them disconnects X-Git-Tag: xonotic-v0.8.2~164 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=accc607f369d0b5c9031f90a5b7c4a4689d844f8;p=xonotic%2Fxonotic-data.pk3dir.git Fix bots occasionally getting stuck when one of them disconnects --- diff --git a/qcsrc/server/bot/default/bot.qc b/qcsrc/server/bot/default/bot.qc index 318422153..c59847390 100644 --- a/qcsrc/server/bot/default/bot.qc +++ b/qcsrc/server/bot/default/bot.qc @@ -374,14 +374,13 @@ void bot_relinkplayerlist() if(prevbot) prevbot.nextbot = it; else - { bot_list = it; - bot_list.nextbot = NULL; - } prevbot = it; ++currentbots; } }); + if(prevbot) + prevbot.nextbot = NULL; LOG_TRACE("relink: ", ftos(currentbots), " bots seen."); bot_strategytoken = bot_list; bot_strategytoken_taken = true;