X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fbot%2Fdefault%2Fscripting.qc;h=252708a1189f0401c7af68b0ff4ff047759e1950;hp=e79c57682dec42882e3ecafc9746d8c38a4a900f;hb=64f2b309aa5be8aafb9ad2137174bb6d99aeb876;hpb=87bec07409c336c956a798556064c6819ad40a4d diff --git a/qcsrc/server/bot/default/scripting.qc b/qcsrc/server/bot/default/scripting.qc index e79c57682d..252708a118 100644 --- a/qcsrc/server/bot/default/scripting.qc +++ b/qcsrc/server/bot/default/scripting.qc @@ -1174,16 +1174,17 @@ float bot_execute_commands_once(entity this) // Find command bot_setcurrentcommand(this); - // if we have no bot command, better return - // old logic kept pressing previously pressed keys, but that has problems - // (namely, it means you cannot make a bot "normal" ever again) - // to keep a bot walking for a while, use the "wait" bot command - if(bot_cmd == NULL) - return false; - // Ignore all commands except continue when the bot is paused - if(this.bot_exec_status & BOT_EXEC_STATUS_PAUSED) - if(bot_cmd.bot_cmd_type!=BOT_CMD_CONTINUE) + if(!(self.bot_exec_status & BOT_EXEC_STATUS_PAUSED)) + { + // if we have no bot command, better return + // old logic kept pressing previously pressed keys, but that has problems + // (namely, it means you cannot make a bot "normal" ever again) + // to keep a bot walking for a while, use the "wait" bot command + if(bot_cmd == world) + return 0; + } + else if(bot_cmd.bot_cmd_type != BOT_CMD_CONTINUE) { if(bot_cmd.bot_cmd_type!=BOT_CMD_NULL) {