#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
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);
}
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);