about summary refs log tree commit diff
path: root/src/game/client/components/scoreboard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/client/components/scoreboard.cpp')
-rw-r--r--src/game/client/components/scoreboard.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/game/client/components/scoreboard.cpp b/src/game/client/components/scoreboard.cpp
index 47603255..2cec5e62 100644
--- a/src/game/client/components/scoreboard.cpp
+++ b/src/game/client/components/scoreboard.cpp
@@ -82,7 +82,7 @@ void CScoreboard::RenderGoals(float x, float y, float w)
 
 void CScoreboard::RenderSpectators(float x, float y, float w)
 {
-	float h = 140.0f;	
+	float h = 140.0f;
 
 	// background
 	Graphics()->BlendNormal();
@@ -194,19 +194,19 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch
 	float NameOffset = TeeOffset+TeeLength, NameLength = 300.0f-TeeLength;
 	float PingOffset = x+610.0f, PingLength = 65.0f;
 	float CountryOffset = PingOffset-(LineHeight-Spacing-TeeSizeMod*5.0f)*2.0f, CountryLength = (LineHeight-Spacing-TeeSizeMod*5.0f)*2.0f;
-	float ClanOffset = x+370.0f, ClanLength = 230.0f-CountryLength;	
+	float ClanOffset = x+370.0f, ClanLength = 230.0f-CountryLength;
 
 	// render headlines
 	y += 50.0f;
 	float HeadlineFontsize = 22.0f;
 	tw = TextRender()->TextWidth(0, HeadlineFontsize, Localize("Score"), -1);
 	TextRender()->Text(0, ScoreOffset+ScoreLength-tw, y, HeadlineFontsize, Localize("Score"), -1);
-	
+
 	TextRender()->Text(0, NameOffset, y, HeadlineFontsize, Localize("Name"), -1);
-	
+
 	tw = TextRender()->TextWidth(0, HeadlineFontsize, Localize("Clan"), -1);
 	TextRender()->Text(0, ClanOffset+ClanLength/2-tw/2, y, HeadlineFontsize, Localize("Clan"), -1);
-	
+
 	tw = TextRender()->TextWidth(0, HeadlineFontsize, Localize("Ping"), -1);
 	TextRender()->Text(0, PingOffset+PingLength-tw, y, HeadlineFontsize, Localize("Ping"), -1);
 
@@ -214,7 +214,7 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch
 	y += HeadlineFontsize*2.0f;
 	float FontSize = 24.0f;
 	CTextCursor Cursor;
-	
+
 	for(int i = 0; i < MAX_CLIENTS; i++)
 	{
 		// make sure that we render the correct team
@@ -249,13 +249,13 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch
 			Graphics()->QuadsBegin();
 
 			RenderTools()->SelectSprite(pInfo->m_Team==TEAM_RED ? SPRITE_FLAG_BLUE : SPRITE_FLAG_RED, SPRITE_FLAG_FLIP_X);
-			
+
 			float Size = LineHeight;
 			IGraphics::CQuadItem QuadItem(TeeOffset+0.0f, y-5.0f-Spacing/2.0f, Size/2.0f, Size);
 			Graphics()->QuadsDrawTL(&QuadItem, 1);
 			Graphics()->QuadsEnd();
 		}
-		
+
 		// avatar
 		CTeeRenderInfo TeeInfo = m_pClient->m_aClients[pInfo->m_ClientID].m_RenderInfo;
 		TeeInfo.m_Size *= TeeSizeMod;
@@ -279,7 +279,7 @@ void CScoreboard::RenderScoreboard(float x, float y, float w, int Team, const ch
 		IGraphics::CQuadItem QuadItem(CountryOffset, y+(Spacing+TeeSizeMod*5.0f)/2.0f, CountryLength, LineHeight-Spacing-TeeSizeMod*5.0f);
 		Graphics()->QuadsDrawTL(&QuadItem, 1);
 		Graphics()->QuadsEnd();
-		
+
 		// ping
 		str_format(aBuf, sizeof(aBuf), "%d", clamp(pInfo->m_Latency, 0, 1000));
 		tw = TextRender()->TextWidth(0, FontSize, aBuf, -1);
@@ -321,15 +321,15 @@ void CScoreboard::OnRender()
 {
 	if(!Active())
 		return;
-		
+
 	// if the score board is active, then we should clear the motd message aswell
 	if(m_pClient->m_pMotd->IsActive())
 		m_pClient->m_pMotd->Clear();
-	
+
 
 	float Width = 400*3.0f*Graphics()->ScreenAspect();
 	float Height = 400*3.0f;
-	
+
 	Graphics()->MapScreen(0, 0, Width, Height);
 
 	float w = 700.0f;
@@ -342,12 +342,12 @@ void CScoreboard::OnRender()
 		{
 			const char *pRedClanName = GetClanName(TEAM_RED);
 			const char *pBlueClanName = GetClanName(TEAM_BLUE);
-			
+
 			if(m_pClient->m_Snap.m_pGameInfoObj->m_GameStateFlags&GAMESTATEFLAG_GAMEOVER && m_pClient->m_Snap.m_pGameDataObj)
 			{
 				char aText[256];
 				str_copy(aText, Localize("Draw!"), sizeof(aText));
-				
+
 				if(m_pClient->m_Snap.m_pGameDataObj->m_TeamscoreRed > m_pClient->m_Snap.m_pGameDataObj->m_TeamscoreBlue)
 				{
 					if(pRedClanName)
@@ -362,11 +362,11 @@ void CScoreboard::OnRender()
 					else
 						str_copy(aText, Localize("Blue team wins!"), sizeof(aText));
 				}
-				
+
 				float w = TextRender()->TextWidth(0, 86.0f, aText, -1);
 				TextRender()->Text(0, Width/2-w/2, 39, 86.0f, aText, -1);
 			}
-			
+
 			RenderScoreboard(Width/2-w-5.0f, 150.0f, w, TEAM_RED, pRedClanName ? pRedClanName : Localize("Red team"));
 			RenderScoreboard(Width/2+5.0f, 150.0f, w, TEAM_BLUE, pBlueClanName ? pBlueClanName : Localize("Blue team"));
 		}
@@ -379,10 +379,10 @@ void CScoreboard::OnRender()
 
 bool CScoreboard::Active()
 {
-	// if we activly wanna look on the scoreboard	
+	// if we activly wanna look on the scoreboard
 	if(m_Active)
 		return true;
-		
+
 	if(m_pClient->m_Snap.m_pLocalInfo && m_pClient->m_Snap.m_pLocalInfo->m_Team != TEAM_SPECTATORS)
 	{
 		// we are not a spectator, check if we are dead
@@ -406,7 +406,7 @@ const char *CScoreboard::GetClanName(int Team)
 		const CNetObj_PlayerInfo *pInfo = m_pClient->m_Snap.m_paInfoByScore[i];
 		if(!pInfo || pInfo->m_Team != Team)
 			continue;
-		
+
 		if(!pClanName)
 		{
 			pClanName = m_pClient->m_aClients[pInfo->m_ClientID].m_aClan;
@@ -420,7 +420,7 @@ const char *CScoreboard::GetClanName(int Team)
 				return 0;
 		}
 	}
-	
+
 	if(ClanPlayers > 1 && pClanName[0])
 		return pClanName;
 	else