]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix "bot_cmd X pause" command not always working
authorterencehill <piuntn@gmail.com>
Tue, 29 Nov 2016 17:57:11 +0000 (18:57 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 29 Nov 2016 17:57:11 +0000 (18:57 +0100)
qcsrc/server/bot/default/scripting.qc

index 9f29a22176264e9e507c24da84854fd67e90c486..9a7997a5a6a9928e4e47217ea0e0c0018756e0ee 100644 (file)
@@ -485,6 +485,7 @@ float bot_cmd_impulse(entity this)
 
 float bot_cmd_continue(entity this)
 {
+       bot_relinkplayerlist();
        this.bot_exec_status &= ~BOT_EXEC_STATUS_PAUSED;
        return CMD_STATUS_FINISHED;
 }
@@ -991,6 +992,7 @@ float bot_cmd_pause(entity this)
        this.movement = '0 0 0';
        this.bot_cmd_keys = BOT_CMD_KEY_NONE;
 
+       bot_clear(this);
        this.bot_exec_status |= BOT_EXEC_STATUS_PAUSED;
        return CMD_STATUS_FINISHED;
 }