- o = e.origin + '0 0 1' * (1 - other.mins_z - 24);
- TeleportPlayer(self, other, o, e.mangle, v_forward * vlen(other.velocity), '0 0 0', '0 0 0', TELEPORT_FLAGS_TELEPORTER);
+ locout = e.origin + '0 0 1' * (1 - player.mins_z - 24);
+ TeleportPlayer(teleporter, player, locout, e.mangle, v_forward * vlen(player.velocity), '0 0 0', '0 0 0', TELEPORT_FLAGS_TELEPORTER);
+
+ return e;
+}
+
+void Teleport_Touch (void)
+{
+ entity oldself;
+ string s;
+
+ if (self.active != ACTIVE_ACTIVE)
+ return;
+
+ if not(other.iscreature)
+ return;
+
+ // for gameplay: vehicles can't teleport
+ if (other.vehicle_flags & VHF_ISVEHICLE)
+ return;
+
+ if (other.deadflag != DEAD_NO)
+ return;
+
+ if(self.team)
+ if((self.spawnflags & 4 == 0) == (self.team != other.team))
+ return;
+
+ EXACTTRIGGER_TOUCH;
+
+ if(other.classname == "player")
+ RemoveGrapplingHook(other);
+
+ entity e;
+ e = Simple_TeleportPlayer(self, other);