From 91289c05edfc99ef7a764c9ca443828eb0dbf0bf Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 23 Sep 2010 20:06:13 +0200 Subject: [PATCH] Block the bots during the countdown to game start in general warmup mode (with g_warmup and sv_ready_restart_after_countdown enabled) Keep doing the last movement until the game starts as they do currently (for example keep running against a wall) just sucks. --- qcsrc/server/bot/bot.qc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/bot/bot.qc b/qcsrc/server/bot/bot.qc index a629b95a1..945600a88 100644 --- a/qcsrc/server/bot/bot.qc +++ b/qcsrc/server/bot/bot.qc @@ -43,7 +43,7 @@ void bot_think() //self.bot_painintensity = self.bot_painintensity + self.bot_oldhealth - self.health; //self.bot_painintensity = bound(0, self.bot_painintensity, 100); - if(time < game_starttime || ((cvar("g_campaign") && !campaign_bots_may_start))) + if (cvar("g_campaign") && !campaign_bots_may_start) { self.nextthink = time + 0.5; return; @@ -81,6 +81,14 @@ void bot_think() self.BUTTON_CHAT = 0; self.BUTTON_USE = 0; + if (time < game_starttime) + { + // block the bot during the countdown to game start + self.movement = '0 0 0'; + self.nextthink = game_starttime; + return; + } + // if dead, just wait until we can respawn if (self.deadflag) { -- 2.39.2