]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix a bot scripting issue :)
authorRudolf Polzer <divverent@xonotic.org>
Mon, 24 Sep 2012 09:48:23 +0000 (11:48 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Mon, 24 Sep 2012 09:48:23 +0000 (11:48 +0200)
qcsrc/server/bot/scripting.qc

index 5752e2f499c506e42686b8770e22a925dfe18473..ef7170563af8fcc9c6c0fb484103120f5b8f6ad2 100644 (file)
@@ -18,6 +18,8 @@ void bot_queuecommand(entity bot, string cmdstring)
        {
                bot.bot_cmdqueuebuf = buf_create();
                bot.bot_cmdqueuebuf_allocated = TRUE;
+               bot.bot_cmdqueuebuf_start = 0;
+               bot.bot_cmdqueuebuf_end = 0;
        }
 
        bufstr_set(bot.bot_cmdqueuebuf, bot.bot_cmdqueuebuf_end, cmdstring);
@@ -1194,6 +1196,7 @@ void bot_resetqueues()
 
        FOR_EACH_CLIENT(cl) if(cl.isbot)
        {
+               cl.bot_cmd_execution_index = 0;
                if(cl.bot_cmdqueuebuf_allocated)
                        bot_clearqueue(cl);
                // also, cancel all barriers