-float generator_send(entity to, float sf)
+#include "generator.qh"
+
+bool generator_send(entity this, entity to, int sf)
{
- WriteByte(MSG_ENTITY, ENT_CLIENT_GENERATOR);
+ WriteHeader(MSG_ENTITY, ENT_CLIENT_GENERATOR);
WriteByte(MSG_ENTITY, sf);
if(sf & GSF_SETUP)
{
WriteByte(MSG_ENTITY, ceil((self.health / self.max_health) * 255));
}
- return TRUE;
+ return true;
}
void generator_link(void() spawnproc)
-{
- Net_LinkEntity(self, TRUE, 0, generator_send);
+{SELFPARAM();
+ Net_LinkEntity(self, true, 0, generator_send);
self.think = spawnproc;
self.nextthink = time;
}