X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fcommon%2Ftriggers%2Ftrigger%2Fteleport.qc;h=129f4e387cbab7ca43b3e9ec93e3fca1b0ff4973;hb=1c758278958da8f2baf1f39cd0f298d5bda097a2;hp=5ff5fcf3357210703844b5c90690b56d07a392be;hpb=fd8a3cfbe15df4e9854dbb288157fe863276a696;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/trigger/teleport.qc b/qcsrc/common/triggers/trigger/teleport.qc index 5ff5fcf33..129f4e387 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 @@ -9,8 +9,7 @@ void trigger_teleport_use() } void Teleport_Touch (void) -{ - entity oldself; +{SELFPARAM(); string s; if (self.active != ACTIVE_ACTIVE) @@ -23,7 +22,7 @@ void Teleport_Touch (void) if(!other.vehicle.teleportable) return; - if(other.turrcaps_flags & TFL_TURRCAPS_ISTURRET) + if(IS_TURRET(other)) return; if(other.deadflag != DEAD_NO) @@ -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(); self.angles = '0 0 0'; EXACTTRIGGER_INIT;