]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
target_spawn: fix crash
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 20 Dec 2015 01:18:27 +0000 (12:18 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 20 Dec 2015 01:18:27 +0000 (12:18 +1100)
qcsrc/common/triggers/target/spawn.qc

index 59737cb992951fbeeb5f6e072c2a3f798d06a729..9a1bc40e6aa461a88702df66f2607153854e8c46 100644 (file)
@@ -15,7 +15,7 @@
 //   2 = trigger on map load
 
 float target_spawn_initialized;
-.void() target_spawn_spawnfunc;
+.void(entity this) target_spawn_spawnfunc;
 float target_spawn_spawnfunc_field;
 .entity target_spawn_activator;
 .float target_spawn_id;
@@ -221,7 +221,7 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                        oldactivator = activator;
 
                        activator = act;
-                       WITH(entity, self, e, e.target_spawn_spawnfunc());
+                       WITH(entity, self, e, e.target_spawn_spawnfunc(e));
                        activator = oldactivator;
 
                        // We called an external function, so we have to re-tokenize msg.