From: MirceaKitsune Date: Sat, 9 Jul 2011 01:36:06 +0000 (+0300) Subject: Send health and armor as shorts instead of coords X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f84370bd8d5c0c079182d3c76a5fa962cf7561a5;p=voretournament%2Fvoretournament.git Send health and armor as shorts instead of coords --- diff --git a/data/qcsrc/client/Main.qc b/data/qcsrc/client/Main.qc index 7686d9ec..fb04060a 100644 --- a/data/qcsrc/client/Main.qc +++ b/data/qcsrc/client/Main.qc @@ -683,9 +683,9 @@ void Ent_ReadEntCS() self.angles_x = self.angles_z = 0; } if(sf & 8) - self.healthvalue = ReadCoord(); + self.healthvalue = ReadShort(); if(sf & 16) - self.armorvalue = ReadCoord(); + self.armorvalue = ReadShort(); if(sf & 32) self.predator = ReadByte(); diff --git a/data/qcsrc/server/ent_cs.qc b/data/qcsrc/server/ent_cs.qc index 9bed96b7..733c449c 100644 --- a/data/qcsrc/server/ent_cs.qc +++ b/data/qcsrc/server/ent_cs.qc @@ -48,9 +48,9 @@ float entcs_send(entity to, float sf) if(sf & 4) WriteByte(MSG_ENTITY, self.angles_y * 256.0 / 360); if(sf & 8) - WriteCoord(MSG_ENTITY, self.health); + WriteShort(MSG_ENTITY, self.health); if(sf & 16) - WriteCoord(MSG_ENTITY, self.armorvalue); + WriteShort(MSG_ENTITY, self.armorvalue); if(sf & 32) WriteByte(MSG_ENTITY, num_for_edict(self.predator)); return TRUE;