]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/client/shownames.qc
Oops... also consider the healthsize_min and healthsize_max values for offsetting...
[voretournament/voretournament.git] / data / qcsrc / client / shownames.qc
index 40daf62b652f9f5fc7fe49a47d982e63df240888..c0cd6e8fd309003cfb6079eabafe1a5509494b38 100644 (file)
@@ -26,7 +26,7 @@ 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");
 
                traceline(ent.origin, view_origin, 1, ent);