Block latent bot movement when it's dead or spectating
authorterencehill <piuntn@gmail.com>
Sun, 4 Dec 2016 01:47:38 +0000 (02:47 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 4 Dec 2016 01:47:38 +0000 (02:47 +0100)
qcsrc/server/bot/default/bot.qc

index 2a7478d..9d612ea 100644 (file)
@@ -72,6 +72,7 @@ void bot_think(entity this)
 
        if (!IS_PLAYER(this) || (autocvar_g_campaign && !campaign_bots_may_start))
        {
+               this.movement = '0 0 0';
                this.bot_nextthink = time + 0.5;
                return;
        }
@@ -118,6 +119,7 @@ void bot_think(entity this)
        // if dead, just wait until we can respawn
        if (IS_DEAD(this))
        {
+               this.movement = '0 0 0';
                if (this.deadflag == DEAD_DEAD)
                {
                        PHYS_INPUT_BUTTON_JUMP(this) = true; // press jump to respawn