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 WITH(entity, self, e, SUB_UseTargets());
50 spawnfunc(trigger_teleport)
52 self.angles = '0 0 0';
56 self.active = ACTIVE_ACTIVE;
58 self.use = trigger_teleport_use;
60 // this must be called to spawn the teleport waypoints for bots
61 InitializeEntity(self, teleport_findtarget, INITPRIO_FINDTARGET);
63 if (self.target == "")
65 objerror ("Teleporter with no target");
69 self.teleport_next = teleport_first;
70 teleport_first = self;