From: terencehill Date: Fri, 26 Mar 2021 16:45:13 +0000 (+0100) Subject: Fix regression caused by the previous commit where bots don't respawn X-Git-Tag: xonotic-v0.8.5~484 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=68049a125cf7c4680ef38d80eb1fb744349a6f34 Fix regression caused by the previous commit where bots don't respawn --- diff --git a/qcsrc/server/bot/default/bot.qc b/qcsrc/server/bot/default/bot.qc index b9d468fbf..59ff81df9 100644 --- a/qcsrc/server/bot/default/bot.qc +++ b/qcsrc/server/bot/default/bot.qc @@ -123,9 +123,14 @@ void bot_think(entity this) return; if (IS_DEAD(this)) { - PHYS_INPUT_BUTTON_JUMP(this) = true; // press jump to respawn if (!navigation_goalrating_timeout(this)) navigation_goalrating_timeout_force(this); + // jump must not be pressed for at least one frame in order for + // PlayerThink to detect the key down event + if (this.deadflag == DEAD_DYING) + PHYS_INPUT_BUTTON_JUMP(this) = false; + else if (this.deadflag == DEAD_DEAD) + PHYS_INPUT_BUTTON_JUMP(this) = true; // press jump to respawn } } else if(this.aistatus & AI_STATUS_STUCK)