2 void trigger_teleport_use()
5 self.team = activator.team;
7 self.SendFlags |= SF_TRIGGER_UPDATE;
11 void Teleport_Touch (void)
16 if (self.active != ACTIVE_ACTIVE)
19 if (!other.teleportable)
23 if(!other.vehicle.teleportable)
26 if(other.turrcaps_flags & TFL_TURRCAPS_ISTURRET)
29 if(other.deadflag != DEAD_NO)
33 if(((self.spawnflags & 4) == 0) == (self.team != other.team))
39 RemoveGrapplingHook(other);
42 e = Simple_TeleportPlayer(self, other);
45 s = self.target; self.target = string_null;
47 if (!self.target) self.target = s;
55 void spawnfunc_trigger_teleport()
57 self.angles = '0 0 0';
61 self.active = ACTIVE_ACTIVE;
63 self.use = trigger_teleport_use;
65 // this must be called to spawn the teleport waypoints for bots
66 InitializeEntity(self, teleport_findtarget, INITPRIO_FINDTARGET);
68 if (self.target == "")
70 objerror ("Teleporter with no target");
74 self.teleport_next = teleport_first;
75 teleport_first = self;