Browse Source

Implement cl_scoreboard_bg cvar.

half-screwed
Night Owl 8 years ago
parent
commit
4fbb070e7d
  1. 5
      cl_dll/scoreboard.cpp

5
cl_dll/scoreboard.cpp

@ -26,6 +26,7 @@
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
cvar_t *cl_scoreboard_bg;
cvar_t *cl_showpacketloss; cvar_t *cl_showpacketloss;
hud_player_info_t g_PlayerInfoList[MAX_PLAYERS + 1]; // player info from the engine hud_player_info_t g_PlayerInfoList[MAX_PLAYERS + 1]; // player info from the engine
extra_player_info_t g_PlayerExtraInfo[MAX_PLAYERS + 1]; // additional player info sent directly to the client dll extra_player_info_t g_PlayerExtraInfo[MAX_PLAYERS + 1]; // additional player info sent directly to the client dll
@ -59,6 +60,7 @@ int CHudScoreboard::Init( void )
InitHUDData(); InitHUDData();
cl_scoreboard_bg = CVAR_CREATE( "cl_scoreboard_bg", "1", 0 );
cl_showpacketloss = CVAR_CREATE( "cl_showpacketloss", "0", FCVAR_ARCHIVE ); cl_showpacketloss = CVAR_CREATE( "cl_showpacketloss", "0", FCVAR_ARCHIVE );
return 1; return 1;
@ -144,7 +146,8 @@ int CHudScoreboard::Draw( float fTime )
FAR_RIGHT = can_show_packetloss ? PL_RANGE_MAX : PING_RANGE_MAX; FAR_RIGHT = can_show_packetloss ? PL_RANGE_MAX : PING_RANGE_MAX;
FAR_RIGHT += 5; FAR_RIGHT += 5;
gHUD.DrawDarkRectangle( xpos - 5, ypos - 5, FAR_RIGHT, ROW_RANGE_MAX ); if( cl_scoreboard_bg && cl_scoreboard_bg->value )
gHUD.DrawDarkRectangle( xpos - 5, ypos - 5, FAR_RIGHT, ROW_RANGE_MAX );
if( !gHUD.m_Teamplay ) if( !gHUD.m_Teamplay )
DrawUtfString( xpos, ypos, NAME_RANGE_MAX + xpos_rel, "Player", 255, 140, 0 ); DrawUtfString( xpos, ypos, NAME_RANGE_MAX + xpos_rel, "Player", 255, 140, 0 );
else else

Loading…
Cancel
Save