about summary refs log tree commit diff
path: root/src/game/client/components/hud.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/client/components/hud.cpp')
-rw-r--r--src/game/client/components/hud.cpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/game/client/components/hud.cpp b/src/game/client/components/hud.cpp
index c0273cfe..00fdd88d 100644
--- a/src/game/client/components/hud.cpp
+++ b/src/game/client/components/hud.cpp
@@ -426,23 +426,26 @@ void CHud::OnRender()
 	m_Height = 300.0f;
 	Graphics()->MapScreen(0.0f, 0.0f, m_Width, m_Height);
 
-	if(m_pClient->m_Snap.m_pLocalCharacter && !(m_pClient->m_Snap.m_pGameInfoObj->m_GameStateFlags&GAMESTATEFLAG_GAMEOVER))
-		RenderHealthAndAmmo(m_pClient->m_Snap.m_pLocalCharacter);
-	else if(m_pClient->m_Snap.m_SpecInfo.m_Active)
+	if(g_Config.m_ClShowhud)
 	{
-		if(m_pClient->m_Snap.m_SpecInfo.m_SpectatorID != SPEC_FREEVIEW)
-			RenderHealthAndAmmo(&m_pClient->m_Snap.m_aCharacters[m_pClient->m_Snap.m_SpecInfo.m_SpectatorID].m_Cur);
-		RenderSpectatorHud();
-	}
+		if(m_pClient->m_Snap.m_pLocalCharacter && !(m_pClient->m_Snap.m_pGameInfoObj->m_GameStateFlags&GAMESTATEFLAG_GAMEOVER))
+			RenderHealthAndAmmo(m_pClient->m_Snap.m_pLocalCharacter);
+		else if(m_pClient->m_Snap.m_SpecInfo.m_Active)
+		{
+			if(m_pClient->m_Snap.m_SpecInfo.m_SpectatorID != SPEC_FREEVIEW)
+				RenderHealthAndAmmo(&m_pClient->m_Snap.m_aCharacters[m_pClient->m_Snap.m_SpecInfo.m_SpectatorID].m_Cur);
+			RenderSpectatorHud();
+		}
 
-	RenderGameTimer();
-	RenderSuddenDeath();
-	RenderScoreHud();
-	RenderWarmupTimer();
-	RenderFps();
-	if(Client()->State() != IClient::STATE_DEMOPLAYBACK)
-		RenderConnectionWarning();
-	RenderTeambalanceWarning();
-	RenderVoting();
+		RenderGameTimer();
+		RenderSuddenDeath();
+		RenderScoreHud();
+		RenderWarmupTimer();
+		RenderFps();
+		if(Client()->State() != IClient::STATE_DEMOPLAYBACK)
+			RenderConnectionWarning();
+		RenderTeambalanceWarning();
+		RenderVoting();
+	}
 	RenderCursor();
 }