]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/target_spawn.qc
Fix copy of ammo_none in defs.qh
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / target_spawn.qc
index 477a57e0aa7d4505a3b7295dc792f53de26dc86a..b4b9b1830509f846efa7aa64f3d701600a07974b 100644 (file)
@@ -48,13 +48,13 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                value = argv(i+1);
                if(key == "$")
                {
-                       data_x = -1;
-                       data_y = FIELD_STRING;
+                       data.x = -1;
+                       data.y = FIELD_STRING;
                }
                else
                {
                        data = stov(db_get(TemporaryDB, strcat("/target_spawn/field/", key)));
-                       if(data_y == 0) // undefined field, i.e., invalid type
+                       if(data.y == 0) // undefined field, i.e., invalid type
                        {
                                print("target_spawn: invalid/unknown entity key ", key, " specified, ignored!\n");
                                continue;
@@ -229,10 +229,13 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
 
                        self = oldself;
                        activator = oldactivator;
+
+                       // We called an external function, so we have to re-tokenize msg.
+                       n = tokenize_console(msg);
                }
                else
                {
-                       if(data_y == FIELD_VECTOR)
+                       if(data.y == FIELD_VECTOR)
                                value = strreplace("'", "", value); // why?!?
                        putentityfieldstring(data.x, e, value);
                }
@@ -322,7 +325,7 @@ void initialize_field_db()
                        ft = entityfieldtype(i);
                        new = i * '1 0 0' + ft * '0 1 0' + '0 0 1';
                        prev = stov(db_get(TemporaryDB, strcat("/target_spawn/field/", fn)));
-                       if(prev_y == 0)
+                       if(prev.y == 0)
                        {
                                db_put(TemporaryDB, strcat("/target_spawn/field/", fn), vtos(new));
                                if(fn == "target_spawn_spawnfunc")