]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Send health and armor as shorts instead of coords
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 01:36:06 +0000 (04:36 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 01:36:06 +0000 (04:36 +0300)
data/qcsrc/client/Main.qc
data/qcsrc/server/ent_cs.qc

index 7686d9ec3d270677f29333ec122a9b70a23bef1a..fb04060acd7b175d8fcf3a77d7e3d17d3387ffcc 100644 (file)
@@ -683,9 +683,9 @@ void Ent_ReadEntCS()
                self.angles_x = self.angles_z = 0;\r
        }\r
        if(sf & 8)\r
-               self.healthvalue = ReadCoord();\r
+               self.healthvalue = ReadShort();\r
        if(sf & 16)\r
-               self.armorvalue = ReadCoord();\r
+               self.armorvalue = ReadShort();\r
        if(sf & 32)\r
                self.predator = ReadByte();\r
 \r
index 9bed96b77f1b826748f8fae34eb2338b688491c0..733c449cd7b66892d7932fcde66f49e013e48a4d 100644 (file)
@@ -48,9 +48,9 @@ float entcs_send(entity to, float sf)
        if(sf & 4)\r
                WriteByte(MSG_ENTITY, self.angles_y * 256.0 / 360);\r
        if(sf & 8)\r
-               WriteCoord(MSG_ENTITY, self.health);\r
+               WriteShort(MSG_ENTITY, self.health);\r
        if(sf & 16)\r
-               WriteCoord(MSG_ENTITY, self.armorvalue);\r
+               WriteShort(MSG_ENTITY, self.armorvalue);\r
        if(sf & 32)\r
                WriteByte(MSG_ENTITY, num_for_edict(self.predator));\r
        return TRUE;\r