]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/shownames.qc
Purge autocvars.qh from the client-side codebase, cvars are defined in the headers...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / shownames.qc
index bee9a2b454880597402cfcc09145f62e53c7c501..e81dd5b87943dffe5e8e53dafa164cc0f3bbba46 100644 (file)
@@ -1,16 +1,13 @@
 #include "shownames.qh"
 
-#include "autocvars.qh"
-#include "main.qh"
-#include "miscfunctions.qh"
-#include "resources.qh"
-#include "hud/_mod.qh"
-
-#include <common/ent_cs.qh>
+#include <client/draw.qh>
+#include <client/hud/_mod.qh>
+#include <client/resources.qh>
+#include <client/view.qh>
 #include <common/constants.qh>
+#include <common/ent_cs.qh>
 #include <common/net_linked.qh>
 #include <common/teams.qh>
-
 #include <lib/csqcmodel/cl_model.qh>
 
 // this.isactive = player is in range and coordinates/status (health and armor) are up to date
@@ -156,7 +153,7 @@ void Draw_ShowNames(entity this)
                myPos.y += (mySize.y / resize - mySize.y);
                // this is where the origin of the string
                float namewidth = mySize.x;
-               if (autocvar_hud_shownames_status && this.sameteam)
+               if (autocvar_hud_shownames_status && this.sameteam && !this.csqcmodel_isdead)
                {
                        vector pos = myPos + eY * autocvar_hud_shownames_fontsize * resize;
                        vector sz = vec2(0.5 * mySize.x, resize * autocvar_hud_shownames_statusbar_height);
@@ -177,7 +174,7 @@ void Draw_ShowNames(entity this)
                }
                string s = entcs_GetName(this.sv_entnum - 1);
                if ((autocvar_hud_shownames_decolorize == 1 && teamplay) || autocvar_hud_shownames_decolorize == 2)
-                       s = playername(s, entcs_GetTeam(this.sv_entnum - 1));
+                       s = playername(s, entcs_GetTeam(this.sv_entnum - 1), true);
                drawfontscale = '1 1 0' * resize;
                s = textShortenToWidth(s, namewidth, '1 1 0' * autocvar_hud_shownames_fontsize, stringwidth_colors);
                float width = stringwidth(s, true, '1 1 0' * autocvar_hud_shownames_fontsize);