From 6c8a54257431fa874254f7003c95fa2002ba7ad9 Mon Sep 17 00:00:00 2001 From: a1batross Date: Mon, 18 Apr 2016 20:04:01 +0300 Subject: [PATCH] Change behaviour of numbers in spectator gui --- cl_dll/hud/spectator_gui.cpp | 17 ++++++++++++++++- cl_dll/include/hud/hud.h | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/cl_dll/hud/spectator_gui.cpp b/cl_dll/hud/spectator_gui.cpp index 22e9594..caa1310 100644 --- a/cl_dll/hud/spectator_gui.cpp +++ b/cl_dll/hud/spectator_gui.cpp @@ -254,7 +254,7 @@ void CHudSpectatorGui::CalcAllNeededData( ) } // team - label.m_iTerrorists = 0; + /*label.m_iTerrorists = 0; label.m_iCounterTerrorists = 0; for( int i = 0; i < MAX_PLAYERS; i++ ) { @@ -268,6 +268,21 @@ void CHudSpectatorGui::CalcAllNeededData( ) case TEAM_TERRORIST: label.m_iTerrorists++; } + }*/ + + label.m_iCounterTerrorists = 0; + label.m_iTerrorists = 0; + for( int i = 0; i < gHUD.m_Scoreboard.m_iNumTeams; i++ ) + { + switch( g_TeamInfo[i].teamnumber ) + { + case TEAM_CT: + label.m_iCounterTerrorists = g_TeamInfo[i].frags; + break; + case TEAM_TERRORIST: + label.m_iTerrorists = g_TeamInfo[i].frags; + break; + } } // timer diff --git a/cl_dll/include/hud/hud.h b/cl_dll/include/hud/hud.h index a6e5cf4..5a45ba0 100644 --- a/cl_dll/include/hud/hud.h +++ b/cl_dll/include/hud/hud.h @@ -319,11 +319,11 @@ public: CHudMsgFunc(TeamNames); int m_iPlayerNum; + int m_iNumTeams; private: int m_iLastKilledBy; int m_fLastKillTime; - int m_iNumTeams; RGBA m_colors; bool m_bDrawStroke; bool m_bForceDraw; // if called by showscoreboard2