]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/client/shownames.qc
Do not show names for prey
[voretournament/voretournament.git] / data / qcsrc / client / shownames.qc
index eb15a240441ecc7d79dfe72000ac66b7b3f956c7..37bd0bfc6a0b7c41e63fc8834ca85c9f5fe1f016 100644 (file)
@@ -2,6 +2,7 @@
 // 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;
@@ -13,6 +14,9 @@ void Draw_ShowNames(entity ent)
        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");
@@ -167,12 +171,14 @@ void Draw_ShowNames_All()
                        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);