]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/teleport.qc
Merge branch 'terencehill/v_deathtilt_fix' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / teleport.qc
index c9b8147139aa8eb27b99a5b28694a41092e046ac..54777b75cb1aa57723aa5d0c4d90c6556bdcaeb7 100644 (file)
@@ -11,8 +11,8 @@ void trigger_teleport_use(entity this, entity actor, entity trigger)
 }
 #endif
 
-void Teleport_Touch ()
-{SELFPARAM();
+void Teleport_Touch (entity this)
+{
        if (self.active != ACTIVE_ACTIVE)
                return;
 
@@ -79,49 +79,47 @@ void trigger_teleport_link(entity this)
 
 spawnfunc(trigger_teleport)
 {
-       self.angles = '0 0 0';
+       this.angles = '0 0 0';
 
-       self.active = ACTIVE_ACTIVE;
-       //trigger_init(self); // only for predicted triggers?
+       this.active = ACTIVE_ACTIVE;
+       //trigger_init(this); // only for predicted triggers?
        EXACTTRIGGER_INIT;
-       self.use = trigger_teleport_use;
+       this.use = trigger_teleport_use;
 
-       if(self.noise != "")
-               FOREACH_WORD(self.noise, true, precache_sound(it));
+       if(this.noise != "")
+               FOREACH_WORD(this.noise, true, precache_sound(it));
 
        // this must be called to spawn the teleport waypoints for bots
-       InitializeEntity(self, teleport_findtarget, INITPRIO_FINDTARGET);
+       InitializeEntity(this, teleport_findtarget, INITPRIO_FINDTARGET);
 
-       if (self.target == "")
+       if (this.target == "")
        {
                objerror ("Teleporter with no target");
                return;
        }
 
-       self.teleport_next = teleport_first;
-       teleport_first = self;
+       this.teleport_next = teleport_first;
+       teleport_first = this;
 }
 #elif defined(CSQC)
 NET_HANDLE(ENT_CLIENT_TRIGGER_TELEPORT, bool isnew)
 {
-       self.classname = "trigger_teleport";
-       int mytm = ReadByte(); if(mytm) { self.team = mytm - 1; }
-       self.spawnflags = ReadInt24_t();
-       self.active = ReadByte();
-       self.speed = ReadCoord();
-
-       trigger_common_read(true);
-
-       self.entremove = trigger_remove_generic;
-       self.solid = SOLID_TRIGGER;
-       //self.draw = trigger_draw_generic;
-       //self.move_touch = trigger_push_touch;
-       self.drawmask = MASK_NORMAL;
-       self.move_time = time;
-       defer(self, 0.25, teleport_findtarget);
-
-       self.teleport_next = teleport_first;
-       teleport_first = self;
+       this.classname = "trigger_teleport";
+       int mytm = ReadByte(); if(mytm) { this.team = mytm - 1; }
+       this.spawnflags = ReadInt24_t();
+       this.active = ReadByte();
+       this.speed = ReadCoord();
+
+       trigger_common_read(this, true);
+
+       this.entremove = trigger_remove_generic;
+       this.solid = SOLID_TRIGGER;
+       //this.move_touch = trigger_push_touch;
+       this.move_time = time;
+       defer(this, 0.25, teleport_findtarget);
+
+       this.teleport_next = teleport_first;
+       teleport_first = this;
 
        return true;
 }