1 #include "controlpoint.qh"
3 #include "command/common.qh"
7 bool cpicon_send(entity this, entity to, int sf)
9 WriteByte(MSG_ENTITY, ENT_CLIENT_CONTROLPOINT_ICON);
10 WriteByte(MSG_ENTITY, sf);
13 WriteCoord(MSG_ENTITY, self.origin_x);
14 WriteCoord(MSG_ENTITY, self.origin_y);
15 WriteCoord(MSG_ENTITY, self.origin_z);
17 WriteByte(MSG_ENTITY, self.health);
18 WriteByte(MSG_ENTITY, self.max_health);
19 WriteByte(MSG_ENTITY, self.count);
20 WriteByte(MSG_ENTITY, self.team);
21 WriteByte(MSG_ENTITY, self.owner.iscaptured);
26 WriteByte(MSG_ENTITY, self.team);
29 WriteByte(MSG_ENTITY, 0);
31 WriteByte(MSG_ENTITY, ceil((self.health / self.max_health) * 255));
37 void onslaught_controlpoint_icon_link(entity e, void() spawnproc)
39 Net_LinkEntity(e, true, 0, cpicon_send);
41 e.nextthink = time * sys_frametime;