]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
scripting fix
authorRudolf Polzer <divverent@xonotic.org>
Wed, 17 Oct 2012 11:36:05 +0000 (13:36 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Wed, 17 Oct 2012 11:36:20 +0000 (13:36 +0200)
qcsrc/server/bot/scripting.qc

index a1c00d0409183fb32e5cea864b7ff3764a5d9c94..7e29160cfa54caad2800cc7f6f295cfca6c3b6e4 100644 (file)
@@ -31,17 +31,17 @@ void bot_queuecommand(entity bot, string cmdstring)
                string parm;
                string cmdstr;
 
-               sp = strstrofs(cmdstr, " ", 0);
+               sp = strstrofs(cmdstring, " ", 0);
                if(sp < 0)
                {
                        parm = "";
                }
                else
                {
-                       parm = substring(cmdstr, sp + 1, -1);
-                       cmdstr = substring(cmdstr, 0, sp);
+                       parm = substring(cmdstring, sp + 1, -1);
+                       cmdstr = substring(cmdstring, 0, sp);
                        if(cmdstr == "sound")
-                               precache_sound(cmdstr);
+                               precache_sound(parm);
                }
        }