self.healthvalue = ReadByte() * 10;\r
if(sf & 16)\r
self.armorvalue = ReadByte() * 10;\r
+ if(sf & 32)\r
+ self.eaten = ReadByte();\r
\r
entcs_receiver[self.sv_entnum] = self;\r
self.entremove = Ent_RemoveEntCS;\r
// self.origin = player origin TODO: should maybe move this so it's the origin of the shownames tag already in SSQC for culling?
// self.healthvalue
// self.armorvalue
+// self.eaten
// self.sameteam = player is on same team as local client
//
const float SHOWNAMES_FADESPEED = 4;
if(ent.sv_entnum == player_localentnum && !cvar("chase_active"))
return;
+ if(ent.eaten) // don't show names for prey
+ return;
+
if(ent.sameteam || (!ent.sameteam && cvar("hud_shownames_enemies")))
{
ent.origin_z += cvar("hud_shownames_offset");
e.healthvalue = entcs.healthvalue;
e.armorvalue = entcs.armorvalue;
e.sameteam = 1; /* (teamplay && (t == myteam)); */
+ e.eaten = entcs.eaten;
}
else
{
e.healthvalue = 2342;
e.armorvalue = 0;
e.sameteam = 0;
+ e.eaten = 0;
}
e.origin = getplayerorigin(i);
.float healthvalue;
.float armorvalue;
+.float eaten;
.float sameteam;
WriteByte(MSG_ENTITY, self.health / 10); // FIXME use a better scale?\r
if(sf & 16)\r
WriteByte(MSG_ENTITY, self.armorvalue / 10); // FIXME use a better scale?\r
+ if(sf & 32)\r
+ WriteByte(MSG_ENTITY, self.stat_eaten);\r
return TRUE;\r
};\r
\r
void entcs_think()\r
{\r
- self.nextthink = time + 0.033333333333; // increase this to like 0.15 once the client can do smoothing\r
+ self.nextthink = time + 0.01;\r
\r
entity o;\r
o = self.owner;\r
self.armorvalue = o.armorvalue;\r
self.SendFlags |= 16;\r
}\r
+ if(o.stat_eaten != self.stat_eaten)\r
+ {\r
+ self.stat_eaten = o.stat_eaten;\r
+ self.SendFlags |= 32;\r
+ }\r
};\r
\r
entity attach_entcs()\r