]> 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 d983cf3aec1d23842ef0f5367e268f4b86fa3fb9..6522669200dee79b380f9c9b9d26bbe94c973c24 100644 (file)
@@ -1,6 +1,6 @@
 #ifdef SVQC
 void trigger_teleport_use()
-{
+{SELFPARAM();
        if(teamplay)
                self.team = activator.team;
 #ifdef SVQC
@@ -8,9 +8,8 @@ void trigger_teleport_use()
 #endif
 }
 
-void Teleport_Touch (void)
-{
-       entity oldself;
+void Teleport_Touch ()
+{SELFPARAM();
        string s;
 
        if (self.active != ACTIVE_ACTIVE)
@@ -38,21 +37,17 @@ 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()
+spawnfunc(trigger_teleport)
 {
        self.angles = '0 0 0';