]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/teleport.qc
Merge branch 'master' into Mario/tweaks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / teleport.qc
index 54777b75cb1aa57723aa5d0c4d90c6556bdcaeb7..484daeedf9d3f0b645f50094c830e79713bfebf8 100644 (file)
@@ -11,49 +11,49 @@ void trigger_teleport_use(entity this, entity actor, entity trigger)
 }
 #endif
 
-void Teleport_Touch (entity this)
+void Teleport_Touch(entity this, entity toucher)
 {
-       if (self.active != ACTIVE_ACTIVE)
+       if (this.active != ACTIVE_ACTIVE)
                return;
 
 #ifdef SVQC
-       if (!other.teleportable)
+       if (!toucher.teleportable)
                return;
 
-       if(other.vehicle)
-       if(!other.vehicle.teleportable)
+       if(toucher.vehicle)
+       if(!toucher.vehicle.teleportable)
                return;
 
-       if(IS_TURRET(other))
+       if(IS_TURRET(toucher))
                return;
 #elif defined(CSQC)
-       if(!IS_PLAYER(other))
+       if(!IS_PLAYER(toucher))
                return;
 #endif
 
-       if(IS_DEAD(other))
+       if(IS_DEAD(toucher))
                return;
 
-       if(self.team)
-               if(((self.spawnflags & 4) == 0) == (DIFF_TEAM(this, other)))
+       if(this.team)
+               if(((this.spawnflags & 4) == 0) == (DIFF_TEAM(this, toucher)))
                        return;
 
-       EXACTTRIGGER_TOUCH;
+       EXACTTRIGGER_TOUCH(this, toucher);
 
 #ifdef SVQC
-       if(IS_PLAYER(other))
-               RemoveGrapplingHook(other);
+       if(IS_PLAYER(toucher))
+               RemoveGrapplingHook(toucher);
 #endif
 
        entity e;
-       e = Simple_TeleportPlayer(self, other);
+       e = Simple_TeleportPlayer(this, toucher);
 
 #ifdef SVQC
-       string s = self.target; self.target = string_null;
-       SUB_UseTargets(self, other, other); // TODO: should we be using other for trigger too?
-       if (!self.target) self.target = s;
+       string s = this.target; this.target = string_null;
+       SUB_UseTargets(this, toucher, toucher); // TODO: should we be using toucher for trigger too?
+       if (!this.target) this.target = s;
 
-       SUB_UseTargets(e, other, other);
+       SUB_UseTargets(e, toucher, toucher);
 #endif
 }
 
@@ -94,7 +94,7 @@ spawnfunc(trigger_teleport)
 
        if (this.target == "")
        {
-               objerror ("Teleporter with no target");
+               objerror (this, "Teleporter with no target");
                return;
        }