]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 2a7478dee2d7688322dfa3006b4534957159bcd3..9d612ea2edb2ba19b34d7368e53b5af044ff6b1b 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