void CHud::OnRender() { if(!m_pClient->m_Snap.m_pGameInfoObj) return; m_Width = 300.0f*Graphics()->ScreenAspect(); m_Height = 300.0f; Graphics()->MapScreen(0.0f, 0.0f, m_Width, m_Height); if(g_Config.m_ClShowhud) { 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(); } RenderCursor(); }
void CHud::OnRender() { if(!m_pClient->m_Snap.m_pGameobj) return; m_Width = 300*Graphics()->ScreenAspect(); bool Spectate = false; if(m_pClient->m_Snap.m_pLocalInfo && m_pClient->m_Snap.m_pLocalInfo->m_Team == TEAM_SPECTATORS) Spectate = true; if(m_pClient->m_Snap.m_pLocalCharacter && !Spectate && !(m_pClient->m_Snap.m_pGameobj && m_pClient->m_Snap.m_pGameobj->m_GameOver)) RenderHealthAndAmmo(); RenderGameTimer(); RenderSuddenDeath(); RenderScoreHud(); RenderWarmupTimer(); RenderFps(); if(Client()->State() != IClient::STATE_DEMOPLAYBACK) RenderConnectionWarning(); RenderTeambalanceWarning(); RenderVoting(); RenderCursor(); }
void CHud::OnRender() { if(!m_pClient->m_Snap.m_pGameData) return; // dont render hud if the menu is active if(m_pClient->m_pMenus->IsActive()) return; m_Width = 300.0f*Graphics()->ScreenAspect(); m_Height = 300.0f; Graphics()->MapScreen(0.0f, 0.0f, m_Width, m_Height); if(g_Config.m_ClShowhud) { if(m_pClient->m_Snap.m_pLocalCharacter && !(m_pClient->m_Snap.m_pGameData->m_GameStateFlags&(GAMESTATEFLAG_ROUNDOVER|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 != -1) RenderHealthAndAmmo(&m_pClient->m_Snap.m_aCharacters[m_pClient->m_Snap.m_SpecInfo.m_SpectatorID].m_Cur); RenderSpectatorHud(); RenderSpectatorNotification(); } RenderGameTimer(); RenderPauseTimer(); RenderStartCountdown(); RenderDeadNotification(); RenderSuddenDeath(); RenderScoreHud(); RenderWarmupTimer(); RenderFps(); if(Client()->State() != IClient::STATE_DEMOPLAYBACK) RenderConnectionWarning(); RenderTeambalanceWarning(); RenderVoting(); } RenderCursor(); }