From: z411 Date: Wed, 21 Apr 2021 22:46:29 +0000 (-0400) Subject: Improve spect HUD CVAR names X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3cc3fd891467801ab51984bd7fd1e1523988e3f6;p=xonotic%2Fxonotic-data.pk3dir.git Improve spect HUD CVAR names --- diff --git a/qcsrc/client/hud/hud.qh b/qcsrc/client/hud/hud.qh index 132f61e20..79c4edd41 100644 --- a/qcsrc/client/hud/hud.qh +++ b/qcsrc/client/hud/hud.qh @@ -211,9 +211,8 @@ vector hud_dynamic_shake_realofs; float hud_dynamic_shake_factor; float hud_dynamic_shake_time; -bool autocvar_hud_spectatordueldisplay = true; -bool autocvar_hud_spectatorteamdisplay = true; //LegendGuard adds a bool to enable/disable team display HUD 06-04-2021 -bool autocvar_hud_spectatorplayernamedisplay = true; //LegendGuard adds a bool to enable/disable player name display HUD 06-04-2021 +bool autocvar_hud_panel_spect_scores = true; //LegendGuard adds a bool to enable/disable score display HUD 06-04-2021 +bool autocvar_hud_panel_spect_playername = true; //LegendGuard adds a bool to enable/disable player name display HUD 06-04-2021 // shared across viewmodel effects and dynamic hud code vector cl_followmodel_ofs; diff --git a/qcsrc/client/hud/panel/infomessages.qc b/qcsrc/client/hud/panel/infomessages.qc index 3e0d46379..62dbc6196 100644 --- a/qcsrc/client/hud/panel/infomessages.qc +++ b/qcsrc/client/hud/panel/infomessages.qc @@ -88,11 +88,14 @@ void HUD_InfoMessages() { if(spectatee_status) { - /*if(spectatee_status == -1) - s = _("^1Observing"); - else - s = sprintf(_("^1Spectating: ^7%s"), entcs_GetName(current_player)); - InfoMessage(s);*/ + // z411 : Show the observed played if we have the spectator HUD disabled + if(!autocvar_hud_panel_spect_playername) { + if(spectatee_status == -1) + s = _("^1Observing"); + else + s = sprintf(_("^1Spectating: ^7%s"), entcs_GetName(current_player)); + InfoMessage(s); + } /*if(autocvar_hud_panel_infomessages_group0) { @@ -123,11 +126,8 @@ void HUD_InfoMessages() //pos = M_ARGV(0, vector); //img_curr_group = M_ARGV(2, int); - //if(!mutator_returnvalue) - //{ - s = sprintf(_("^1Press ^3%s^1 to join"), getcommandkey(_("jump"), "+jump")); - InfoMessage(s); - //} + s = sprintf(_("^1Press ^3%s^1 to join"), getcommandkey(_("jump"), "+jump")); + InfoMessage(s); } if (time < STAT(GAMESTARTTIME)) diff --git a/qcsrc/client/hud/panel/score.qc b/qcsrc/client/hud/panel/score.qc index 3046335ca..dca00c4cb 100644 --- a/qcsrc/client/hud/panel/score.qc +++ b/qcsrc/client/hud/panel/score.qc @@ -214,10 +214,8 @@ void HUD_Score() if (!scoreboard_fade_alpha) // the scoreboard too calls Scoreboard_UpdatePlayerTeams Scoreboard_UpdatePlayerTeams(); - if(spectatee_status) { - if(teamplay && autocvar_hud_spectatorteamdisplay) return; - if(gametype == MAPINFO_TYPE_DUEL && autocvar_hud_spectatordueldisplay) return; - } + // z411 : Don't display if we have the spectator HUD scores enabled + if(spectatee_status && autocvar_hud_panel_spect_scores) return; HUD_Panel_LoadCvars(); vector pos, mySize; diff --git a/qcsrc/client/hud/panel/spect.qc b/qcsrc/client/hud/panel/spect.qc index 3bdede227..6929539e1 100644 --- a/qcsrc/client/hud/panel/spect.qc +++ b/qcsrc/client/hud/panel/spect.qc @@ -259,7 +259,7 @@ void HUD_SpectHUD() hud_fontsize = HUD_GetFontsize("hud_fontsize"); // Spectator name - if (autocvar_hud_spectatorplayernamedisplay) + if (autocvar_hud_panel_spect_playername) { if(spectatee_status != -1) { ammo_y = stov(cvar_string("hud_panel_ammo_pos")).y * vid_conheight; @@ -268,7 +268,9 @@ void HUD_SpectHUD() } } - if (teamplay && autocvar_hud_spectatorteamdisplay) + // Scores + if (!autocvar_hud_panel_spect_scores) return; + if (teamplay) { // Set vars teamscore_fontsize = hud_fontsize * 3; @@ -315,7 +317,7 @@ void HUD_SpectHUD() pos = panel_pos + vec2(vid_conwidth - 1, (vid_conheight + 450) / 4 + hud_fontsize.y); HUD_SpectHUD_drawTeamPlayers(pos, tm, rgb, true); - } else if(gametype == MAPINFO_TYPE_DUEL && autocvar_hud_spectatordueldisplay) { + } else if(gametype == MAPINFO_TYPE_DUEL) { // Set vars teamscore_fontsize = hud_fontsize * 3; teamname_fontsize = hud_fontsize * 1.5;