diff options
Diffstat (limited to 'src/game/client/components/spectator.cpp')
| -rw-r--r-- | src/game/client/components/spectator.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/game/client/components/spectator.cpp b/src/game/client/components/spectator.cpp index 94889de7..41c7b48f 100644 --- a/src/game/client/components/spectator.cpp +++ b/src/game/client/components/spectator.cpp @@ -32,7 +32,7 @@ void CSpectator::ConSpectateNext(IConsole::IResult *pResult, void *pUserData) CSpectator *pSelf = (CSpectator *)pUserData; int NewSpectatorID; bool GotNewSpectatorID = false; - + if(pSelf->m_pClient->m_Snap.m_SpecInfo.m_SpectatorID == SPEC_FREEVIEW) { for(int i = 0; i < MAX_CLIENTS; i++) @@ -56,7 +56,7 @@ void CSpectator::ConSpectateNext(IConsole::IResult *pResult, void *pUserData) GotNewSpectatorID = true; break; } - + if(!GotNewSpectatorID) { for(int i = 0; i < pSelf->m_pClient->m_Snap.m_SpecInfo.m_SpectatorID; i++) @@ -79,7 +79,7 @@ void CSpectator::ConSpectatePrevious(IConsole::IResult *pResult, void *pUserData CSpectator *pSelf = (CSpectator *)pUserData; int NewSpectatorID; bool GotNewSpectatorID = false; - + if(pSelf->m_pClient->m_Snap.m_SpecInfo.m_SpectatorID == SPEC_FREEVIEW) { for(int i = MAX_CLIENTS -1; i > -1; i--) @@ -103,7 +103,7 @@ void CSpectator::ConSpectatePrevious(IConsole::IResult *pResult, void *pUserData GotNewSpectatorID = true; break; } - + if(!GotNewSpectatorID) { for(int i = MAX_CLIENTS - 1; i > pSelf->m_pClient->m_Snap.m_SpecInfo.m_SpectatorID; i--) @@ -138,7 +138,7 @@ bool CSpectator::OnMouseMove(float x, float y) { if(!m_Active) return false; - + m_SelectorMouse += vec2(x,y); return true; } @@ -147,7 +147,7 @@ void CSpectator::OnRelease() { OnReset(); } - + void CSpectator::OnRender() { if(!m_Active) @@ -160,14 +160,14 @@ void CSpectator::OnRender() } return; } - + m_WasActive = true; m_SelectedSpectatorID = NO_SELECTION; // draw background float Width = 400*3.0f*Graphics()->ScreenAspect(); float Height = 400*3.0f; - + Graphics()->MapScreen(0, 0, Width, Height); Graphics()->BlendNormal(); @@ -185,7 +185,7 @@ void CSpectator::OnRender() float FontSize = 20.0f; float StartY = -190.0f; float LineHeight = 60.0f; - bool Selected = false; + bool Selected = false; if(m_pClient->m_Snap.m_SpecInfo.m_SpectatorID == SPEC_FREEVIEW) { @@ -238,7 +238,7 @@ void CSpectator::OnRender() CTeeRenderInfo TeeInfo = m_pClient->m_aClients[i].m_RenderInfo; RenderTools()->RenderTee(CAnimState::GetIdle(), &TeeInfo, EMOTE_NORMAL, vec2(1.0f, 0.0f), vec2(Width/2.0f+x+20.0f, Height/2.0f+y+20.0f)); - + y += LineHeight; } TextRender()->TextColor(1.0f, 1.0f, 1.0f, 1.0f); |