]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/shownames.qc
remove unnecessary main.qh includes (also one server/player.qh include)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / shownames.qc
index e44e18f753b881a2969ad6887427c4d7727becc7..fcca84189f697a9ac0e1d18368abc5384ae17a85 100644 (file)
@@ -1,15 +1,14 @@
 #include "shownames.qh"
 
 #include "autocvars.qh"
-#include "miscfunctions.qh"
+#include <client/draw.qh>
 #include "resources.qh"
+#include <client/view.qh>
 #include "hud/_mod.qh"
 
 #include <common/ent_cs.qh>
 #include <common/constants.qh>
-#include <common/gamemodes/_mod.qh>
 #include <common/net_linked.qh>
-#include <common/mapinfo.qh>
 #include <common/teams.qh>
 
 #include <lib/csqcmodel/cl_model.qh>
@@ -157,7 +156,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);
@@ -178,7 +177,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);