From: z411 Date: Sun, 18 Apr 2021 21:50:08 +0000 (-0400) Subject: Showing Spectating label in spectator HUD X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d2abb17029974107c91a8d53ed8b3d5c5d641090;p=xonotic%2Fxonotic-data.pk3dir.git Showing Spectating label in spectator HUD --- 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)