2 void trigger_teleport_use()
5 self.team = activator.team;
7 self.SendFlags |= SF_TRIGGER_UPDATE;
11 void Teleport_Touch (void)
15 if (self.active != ACTIVE_ACTIVE)
18 if (!other.teleportable)
22 if(!other.vehicle.teleportable)
28 if(other.deadflag != DEAD_NO)
32 if(((self.spawnflags & 4) == 0) == (self.team != other.team))
38 RemoveGrapplingHook(other);
40 entity e = Simple_TeleportPlayer(self, other);
43 s = self.target; self.target = string_null;
45 if (!self.target) self.target = s;
47 SELFCALL(e, SUB_UseTargets());
51 void spawnfunc_trigger_teleport()
53 self.angles = '0 0 0';
57 self.active = ACTIVE_ACTIVE;
59 self.use = trigger_teleport_use;
61 // this must be called to spawn the teleport waypoints for bots
62 InitializeEntity(self, teleport_findtarget, INITPRIO_FINDTARGET);
64 if (self.target == "")
66 objerror ("Teleporter with no target");
70 self.teleport_next = teleport_first;
71 teleport_first = self;