Do not send entcs for prey. This saves us from having to check the predator client...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 13:07:35 +0000 (16:07 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 13:07:35 +0000 (16:07 +0300)
data/qcsrc/client/Main.qc
data/qcsrc/client/shownames.qc
data/qcsrc/client/shownames.qh
data/qcsrc/server/ent_cs.qc

index 6e73123..90dce73 100644 (file)
@@ -686,8 +686,6 @@ void Ent_ReadEntCS()
                self.healthvalue = ReadShort();\r
        if(sf & 16)\r
                self.armorvalue = ReadShort();\r
-       if(sf & 32)\r
-               self.predator = ReadByte();\r
 \r
        entcs_receiver[self.sv_entnum] = self;\r
        self.entremove = Ent_RemoveEntCS;\r
index c0cd6e8..f00e9a4 100644 (file)
@@ -13,9 +13,6 @@ void Draw_ShowNames(entity ent)
        if(ent.sv_entnum == player_localentnum && !cvar("chase_active"))
                return;
 
-       if(ent.predator) // don't show names for prey
-               return;
-
        float sameteam;
        if(teamplay && (GetPlayerColor(player_localentnum - 1) == GetPlayerColor(ent.sv_entnum - 1)))
                sameteam = TRUE;
@@ -168,13 +165,11 @@ void Draw_ShowNames_All()
                {
                        e.healthvalue = entcs.healthvalue;
                        e.armorvalue = entcs.armorvalue;
-                       e.predator = entcs.predator;
                }
                else
                {
                        e.healthvalue = 2342;
                        e.armorvalue = 0;
-                       e.predator = 0;
                }
 
                e.origin = getplayerorigin(i);
index 630f8e2..62aaae2 100644 (file)
@@ -1,3 +1,2 @@
 .float healthvalue;
 .float armorvalue;
-.float predator;
index 733c449..0743388 100644 (file)
@@ -30,6 +30,8 @@ float entcs_customize()
                return FALSE;\r
        if(other == o)\r
                return FALSE;\r
+       if(o.stat_eaten)\r
+               return FALSE;\r
        return TRUE;\r
 }\r
 \r
@@ -51,8 +53,6 @@ float entcs_send(entity to, float sf)
                WriteShort(MSG_ENTITY, self.health);\r
        if(sf & 16)\r
                WriteShort(MSG_ENTITY, self.armorvalue);\r
-       if(sf & 32)\r
-               WriteByte(MSG_ENTITY, num_for_edict(self.predator));\r
        return TRUE;\r
 };\r
 \r
@@ -83,11 +83,6 @@ void entcs_think()
                self.armorvalue = o.armorvalue;\r
                self.SendFlags |= 16;\r
        }\r
-       if(o.predator != self.predator)\r
-       {\r
-               self.predator = o.predator;\r
-               self.SendFlags |= 32;\r
-       }\r
 };\r
 \r
 entity attach_entcs()\r