]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/client/shownames.qc
Make bots jump while being swallowed, to make it even harder to eat them. They should...
[voretournament/voretournament.git] / data / qcsrc / client / shownames.qc
index 35fdd1a6b11cf030fce7e01650bffc5034795bb1..f00e9a407dc9c8c647bfc9751a069c8f17522744 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;
@@ -26,10 +23,9 @@ void Draw_ShowNames(entity ent)
 
                // offset the name by player scale, decided by health
                if(g_healthsize)
-                       ent.origin_z -= (g_healthsize - ent.healthvalue) * cvar("hud_shownames_offset_healthsize");
+                       ent.origin_z -= (g_healthsize - bound(g_healthsize_min, ent.healthvalue, g_healthsize_max)) * cvar("hud_shownames_offset_healthsize");
 
-               if(!sameteam)
-                       traceline(ent.origin, view_origin, 1, ent);
+               traceline(ent.origin, view_origin, 1, ent);
 
                vector o, eo;
                o = project_3d_to_2d(ent.origin);
@@ -56,7 +52,7 @@ void Draw_ShowNames(entity ent)
                        }
                }
 
-               if(!sameteam && trace_endpos != view_origin) // out of view, fade out
+               if(trace_endpos != view_origin) // out of view, fade out
                        ent.alpha = max(0, ent.alpha - SHOWNAMES_FADESPEED * frametime);
                else if(ent.healthvalue < 1) // dead player, fade out slowly
                        ent.alpha = max(0, ent.alpha - SHOWNAMES_FADESPEED * 0.25 * frametime);
@@ -169,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);