X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ftrigger%2Fteleport.qc;h=6522669200dee79b380f9c9b9d26bbe94c973c24;hp=d983cf3aec1d23842ef0f5367e268f4b86fa3fb9;hb=d4e9ae30b350c9f471dcb72929e976735c818919;hpb=1556aa4ea70b3b275afb1cb4587e555fb44f71c3 diff --git a/qcsrc/common/triggers/trigger/teleport.qc b/qcsrc/common/triggers/trigger/teleport.qc index d983cf3ae..652266920 100644 --- a/qcsrc/common/triggers/trigger/teleport.qc +++ b/qcsrc/common/triggers/trigger/teleport.qc @@ -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';