1 REGISTER_NET_LINKED(ENT_CLIENT_TELEPORT_DEST)
5 bool teleport_dest_send(entity this, entity to, float sf)
7 WriteHeader(MSG_ENTITY, ENT_CLIENT_TELEPORT_DEST);
9 WriteByte(MSG_ENTITY, self.cnt);
10 WriteCoord(MSG_ENTITY, self.speed);
11 WriteString(MSG_ENTITY, self.targetname);
12 WriteCoord(MSG_ENTITY, self.origin_x);
13 WriteCoord(MSG_ENTITY, self.origin_y);
14 WriteCoord(MSG_ENTITY, self.origin_z);
16 WriteAngle(MSG_ENTITY, self.mangle_x);
17 WriteAngle(MSG_ENTITY, self.mangle_y);
18 WriteAngle(MSG_ENTITY, self.mangle_z);
23 void teleport_dest_link()
25 Net_LinkEntity(self, false, 0, teleport_dest_send);
26 //self.SendFlags |= 1; // update
29 spawnfunc(info_teleport_destination)
31 self.classname = "info_teleport_destination";
33 self.mangle = self.angles;
34 self.angles = '0 0 0';
36 //setorigin (self, self.origin + '0 0 27'); // To fix a mappers' habit as old as Quake
37 setorigin (self, self.origin);
43 objerror ("^3Teleport destination without a targetname");
48 spawnfunc(misc_teleporter_dest)
50 spawnfunc_info_teleport_destination(this);
53 spawnfunc(target_teleporter)
55 spawnfunc_info_teleport_destination(this);
60 void teleport_dest_remove()
63 //strunzone(self.classname);
64 //self.classname = string_null;
67 strunzone(self.targetname);
68 self.targetname = string_null;
71 NET_HANDLE(ENT_CLIENT_TELEPORT_DEST, bool isnew)
73 self.classname = "info_teleport_destination";
74 self.cnt = ReadByte();
75 self.speed = ReadCoord();
76 self.targetname = strzone(ReadString());
77 self.origin_x = ReadCoord();
78 self.origin_y = ReadCoord();
79 self.origin_z = ReadCoord();
81 self.mangle_x = ReadAngle();
82 self.mangle_y = ReadAngle();
83 self.mangle_z = ReadAngle();
87 setorigin(self, self.origin);
89 self.drawmask = MASK_NORMAL;
90 self.entremove = teleport_dest_remove;