]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Showing Spectating label in spectator HUD
authorz411 <z411@omaera.org>
Sun, 18 Apr 2021 21:50:08 +0000 (17:50 -0400)
committerz411 <z411@omaera.org>
Sun, 18 Apr 2021 21:50:08 +0000 (17:50 -0400)
qcsrc/client/hud/panel/spect.qc

index c9511504309458dea1b342b8a80438b07f5e6679..2c153b9250fff1e87a583690b09629aa7f0e8e0c 100644 (file)
@@ -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)