- WriteByte(MSG_ENTITY, num_for_edict(o));
- WriteShort(MSG_ENTITY, o.origin_x);
- WriteShort(MSG_ENTITY, o.origin_y);
- WriteShort(MSG_ENTITY, o.origin_z);
- WriteByte(MSG_ENTITY, o.angles_y * 256.0 / 360);
+ WriteByte(MSG_ENTITY, sf);
+ if(sf & 1)
+ WriteByte(MSG_ENTITY, num_for_edict(self.owner)-1);
+ if(sf & 2)
+ {
+ WriteShort(MSG_ENTITY, self.origin_x);
+ WriteShort(MSG_ENTITY, self.origin_y);
+ WriteShort(MSG_ENTITY, self.origin_z);
+ }
+ if(sf & 4)
+ WriteByte(MSG_ENTITY, self.angles_y * 256.0 / 360);
+ if(sf & 8)
+ WriteByte(MSG_ENTITY, self.health / 10); // FIXME use a better scale?
+ if(sf & 16)
+ WriteByte(MSG_ENTITY, self.armorvalue / 10); // FIXME use a better scale?