From: MirceaKitsune Date: Sat, 9 Jul 2011 13:07:35 +0000 (+0300) Subject: Do not send entcs for prey. This saves us from having to check the predator client... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3821e176c705da0399df4735af39074955f3c50c;p=voretournament%2Fvoretournament.git Do not send entcs for prey. This saves us from having to check the predator client-side and network it over. It also fixes the issue of prey showing on the team radar. --- diff --git a/data/qcsrc/client/Main.qc b/data/qcsrc/client/Main.qc index 6e731232..90dce734 100644 --- a/data/qcsrc/client/Main.qc +++ b/data/qcsrc/client/Main.qc @@ -686,8 +686,6 @@ void Ent_ReadEntCS() self.healthvalue = ReadShort(); if(sf & 16) self.armorvalue = ReadShort(); - if(sf & 32) - self.predator = ReadByte(); entcs_receiver[self.sv_entnum] = self; self.entremove = Ent_RemoveEntCS; diff --git a/data/qcsrc/client/shownames.qc b/data/qcsrc/client/shownames.qc index c0cd6e8f..f00e9a40 100644 --- a/data/qcsrc/client/shownames.qc +++ b/data/qcsrc/client/shownames.qc @@ -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); diff --git a/data/qcsrc/client/shownames.qh b/data/qcsrc/client/shownames.qh index 630f8e2e..62aaae2b 100644 --- a/data/qcsrc/client/shownames.qh +++ b/data/qcsrc/client/shownames.qh @@ -1,3 +1,2 @@ .float healthvalue; .float armorvalue; -.float predator; diff --git a/data/qcsrc/server/ent_cs.qc b/data/qcsrc/server/ent_cs.qc index 733c449c..0743388f 100644 --- a/data/qcsrc/server/ent_cs.qc +++ b/data/qcsrc/server/ent_cs.qc @@ -30,6 +30,8 @@ float entcs_customize() return FALSE; if(other == o) return FALSE; + if(o.stat_eaten) + return FALSE; return TRUE; } @@ -51,8 +53,6 @@ float entcs_send(entity to, float sf) WriteShort(MSG_ENTITY, self.health); if(sf & 16) WriteShort(MSG_ENTITY, self.armorvalue); - if(sf & 32) - WriteByte(MSG_ENTITY, num_for_edict(self.predator)); return TRUE; }; @@ -83,11 +83,6 @@ void entcs_think() self.armorvalue = o.armorvalue; self.SendFlags |= 16; } - if(o.predator != self.predator) - { - self.predator = o.predator; - self.SendFlags |= 32; - } }; entity attach_entcs()