Offset the names for scaled players, to match the proper scale
[voretournament/voretournament.git] / data / qcsrc / client / shownames.qc
index fac602ee0f6a0ee44d568ccfca31398c5053eeef..7dac25a5254eca2a6fbc741d023fe17b7a724c39 100644 (file)
@@ -21,6 +21,10 @@ void Draw_ShowNames(entity ent)
        {
                ent.origin_z += cvar("hud_shownames_offset");
 
+               // offset the name by player scale, decided by health
+               if(g_healthsize)
+                       ent.origin_z -= (g_healthsize - ent.healthvalue) * cvar("hud_shownames_offset_healthsize");
+
                if(!ent.sameteam)
                {
                        /* WIP, why does trace_ent != ent not work as intended here?