]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/teleport.qc
s/(void)/()
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / teleport.qc
index 5adc1505c536d7995fbf0235031c5ae117515dcb..6522669200dee79b380f9c9b9d26bbe94c973c24 100644 (file)
@@ -8,9 +8,8 @@ void trigger_teleport_use()
 #endif
 }
 
-void Teleport_Touch (void)
+void Teleport_Touch ()
 {SELFPARAM();
-       entity oldself;
        string s;
 
        if (self.active != ACTIVE_ACTIVE)
@@ -38,22 +37,18 @@ void Teleport_Touch (void)
        if(IS_PLAYER(other))
                RemoveGrapplingHook(other);
 
-       entity e;
-       e = Simple_TeleportPlayer(self, other);
+       entity e = Simple_TeleportPlayer(self, other);
 
        activator = other;
        s = self.target; self.target = string_null;
        SUB_UseTargets();
        if (!self.target) self.target = s;
 
-       oldself = self;
-       self = e;
-       SUB_UseTargets();
-       self = oldself;
+       WITH(entity, self, e, SUB_UseTargets());
 }
 
-void spawnfunc_trigger_teleport()
-{SELFPARAM();
+spawnfunc(trigger_teleport)
+{
        self.angles = '0 0 0';
 
        EXACTTRIGGER_INIT;