Advertisement
Dunedune

Untitled

Mar 29th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.96 KB | None | 0 0
  1.  
  2. void CHud::OnRender()
  3. {
  4.     if(!m_pClient->m_Snap.m_pGameInfoObj)
  5.         return;
  6.  
  7.     m_Width = 300.0f*Graphics()->ScreenAspect();
  8.     m_Height = 300.0f;
  9.     Graphics()->MapScreen(0.0f, 0.0f, m_Width, m_Height);
  10.  
  11.     if(g_Config.m_ClShowhud)
  12.     {
  13.         if(m_pClient->m_Snap.m_pLocalCharacter && !(m_pClient->m_Snap.m_pGameInfoObj->m_GameStateFlags&GAMESTATEFLAG_GAMEOVER))
  14.             RenderHealthAndAmmo(m_pClient->m_Snap.m_pLocalCharacter);
  15.         else if(m_pClient->m_Snap.m_SpecInfo.m_Active)
  16.         {
  17.             if(m_pClient->m_Snap.m_SpecInfo.m_SpectatorID != SPEC_FREEVIEW)
  18.                 RenderHealthAndAmmo(&m_pClient->m_Snap.m_aCharacters[m_pClient->m_Snap.m_SpecInfo.m_SpectatorID].m_Cur);
  19.             RenderSpectatorHud();
  20.         }
  21.  
  22.         RenderGameTimer();
  23.         RenderPauseNotification();
  24.         RenderSuddenDeath();
  25.         RenderScoreHud();
  26.         RenderWarmupTimer();
  27.         RenderFps();
  28.         if(Client()->State() != IClient::STATE_DEMOPLAYBACK)
  29.             RenderConnectionWarning();
  30.         RenderTeambalanceWarning();
  31.         RenderVoting();
  32.     }
  33.     RenderCursor();
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement