From d2abb17029974107c91a8d53ed8b3d5c5d641090 Mon Sep 17 00:00:00 2001 From: z411 Date: Sun, 18 Apr 2021 17:50:08 -0400 Subject: [PATCH] Showing Spectating label in spectator HUD --- qcsrc/client/hud/panel/spect.qc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/hud/panel/spect.qc b/qcsrc/client/hud/panel/spect.qc index c95115043..2c153b925 100644 --- a/qcsrc/client/hud/panel/spect.qc +++ b/qcsrc/client/hud/panel/spect.qc @@ -14,9 +14,18 @@ void HUD_SpectHUD_Export(int fh) void HUD_SpectHUD_drawCurrentName(vector pos) { + vector tmp; + + tmp = pos; string s = entcs_GetName(current_player); - pos.x -= stringwidth_colors(s, hud_fontsize * 2) / 2; - drawcolorcodedstring(pos, s, hud_fontsize * 2, panel_fg_alpha, DRAWFLAG_NORMAL); + tmp.x -= stringwidth_colors(s, hud_fontsize * 2) / 2; + drawcolorcodedstring(tmp, s, hud_fontsize * 2, panel_fg_alpha, DRAWFLAG_NORMAL); + + tmp = pos; + s = "Spectating"; + tmp.x -= stringwidth_colors(s, hud_fontsize) / 2; + tmp.y -= hud_fontsize.y; + drawcolorcodedstring(tmp, s, hud_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); } void HUD_SpectHUD_drawTeamPlayers(vector pos, entity tm, vector rgb, bool invert) -- 2.39.2