1 #include "generator.qh"
3 bool generator_send(entity to, int sf)
5 WriteByte(MSG_ENTITY, ENT_CLIENT_GENERATOR);
6 WriteByte(MSG_ENTITY, sf);
9 WriteCoord(MSG_ENTITY, self.origin_x);
10 WriteCoord(MSG_ENTITY, self.origin_y);
11 WriteCoord(MSG_ENTITY, self.origin_z);
13 WriteByte(MSG_ENTITY, self.health);
14 WriteByte(MSG_ENTITY, self.max_health);
15 WriteByte(MSG_ENTITY, self.count);
16 WriteByte(MSG_ENTITY, self.team);
21 WriteByte(MSG_ENTITY, self.team);
24 WriteByte(MSG_ENTITY, 0);
26 WriteByte(MSG_ENTITY, ceil((self.health / self.max_health) * 255));
32 void generator_link(void() spawnproc)
34 Net_LinkEntity(self, true, 0, generator_send);
35 self.think = spawnproc;
36 self.nextthink = time;