diff options
| author | Johannes Loher <ghost91@gmx.net> | 2011-04-04 10:42:36 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-04-04 17:29:32 +0200 |
| commit | 622b3de9bd224dca8c55ea6ab7b12d05dc30e705 (patch) | |
| tree | 3f7bd999a525c948805c633be58b51f7ecf2d412 /src | |
| parent | 1364631211a42b6fc5ed7eb5a7ecb6ab6e7a7422 (diff) | |
| download | zcatch-622b3de9bd224dca8c55ea6ab7b12d05dc30e705.tar.gz zcatch-622b3de9bd224dca8c55ea6ab7b12d05dc30e705.zip | |
Added more convenient variabe names for sectate_next and spectator_previous
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/client/components/spectator.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/game/client/components/spectator.cpp b/src/game/client/components/spectator.cpp index b3bdff7c..94889de7 100644 --- a/src/game/client/components/spectator.cpp +++ b/src/game/client/components/spectator.cpp @@ -30,8 +30,8 @@ void CSpectator::ConSpectate(IConsole::IResult *pResult, void *pUserData) void CSpectator::ConSpectateNext(IConsole::IResult *pResult, void *pUserData) { CSpectator *pSelf = (CSpectator *)pUserData; - int SelectedSpectator; - bool GotNewPlayer = false; + int NewSpectatorID; + bool GotNewSpectatorID = false; if(pSelf->m_pClient->m_Snap.m_SpecInfo.m_SpectatorID == SPEC_FREEVIEW) { @@ -40,8 +40,8 @@ void CSpectator::ConSpectateNext(IConsole::IResult *pResult, void *pUserData) if(!pSelf->m_pClient->m_Snap.m_paPlayerInfos[i] || pSelf->m_pClient->m_Snap.m_paPlayerInfos[i]->m_Team == TEAM_SPECTATORS) continue; - SelectedSpectator = i; - GotNewPlayer = true; + NewSpectatorID = i; + GotNewSpectatorID = true; break; } } @@ -52,33 +52,33 @@ void CSpectator::ConSpectateNext(IConsole::IResult *pResult, void *pUserData) if(!pSelf->m_pClient->m_Snap.m_paPlayerInfos[i] || pSelf->m_pClient->m_Snap.m_paPlayerInfos[i]->m_Team == TEAM_SPECTATORS) continue; - SelectedSpectator = i; - GotNewPlayer = true; + NewSpectatorID = i; + GotNewSpectatorID = true; break; } - if(!GotNewPlayer) + if(!GotNewSpectatorID) { for(int i = 0; i < pSelf->m_pClient->m_Snap.m_SpecInfo.m_SpectatorID; i++) { if(!pSelf->m_pClient->m_Snap.m_paPlayerInfos[i] || pSelf->m_pClient->m_Snap.m_paPlayerInfos[i]->m_Team == TEAM_SPECTATORS) continue; - SelectedSpectator = i; - GotNewPlayer = true; + NewSpectatorID = i; + GotNewSpectatorID = true; break; } } } - if(GotNewPlayer) - pSelf->Spectate(SelectedSpectator); + if(GotNewSpectatorID) + pSelf->Spectate(NewSpectatorID); } void CSpectator::ConSpectatePrevious(IConsole::IResult *pResult, void *pUserData) { CSpectator *pSelf = (CSpectator *)pUserData; - int SelectedSpectator; - bool GotNewPlayer = false; + int NewSpectatorID; + bool GotNewSpectatorID = false; if(pSelf->m_pClient->m_Snap.m_SpecInfo.m_SpectatorID == SPEC_FREEVIEW) { @@ -87,8 +87,8 @@ void CSpectator::ConSpectatePrevious(IConsole::IResult *pResult, void *pUserData if(!pSelf->m_pClient->m_Snap.m_paPlayerInfos[i] || pSelf->m_pClient->m_Snap.m_paPlayerInfos[i]->m_Team == TEAM_SPECTATORS) continue; - SelectedSpectator = i; - GotNewPlayer = true; + NewSpectatorID = i; + GotNewSpectatorID = true; break; } } @@ -99,26 +99,26 @@ void CSpectator::ConSpectatePrevious(IConsole::IResult *pResult, void *pUserData if(!pSelf->m_pClient->m_Snap.m_paPlayerInfos[i] || pSelf->m_pClient->m_Snap.m_paPlayerInfos[i]->m_Team == TEAM_SPECTATORS) continue; - SelectedSpectator = i; - GotNewPlayer = true; + NewSpectatorID = i; + GotNewSpectatorID = true; break; } - if(!GotNewPlayer) + if(!GotNewSpectatorID) { for(int i = MAX_CLIENTS - 1; i > pSelf->m_pClient->m_Snap.m_SpecInfo.m_SpectatorID; i--) { if(!pSelf->m_pClient->m_Snap.m_paPlayerInfos[i] || pSelf->m_pClient->m_Snap.m_paPlayerInfos[i]->m_Team == TEAM_SPECTATORS) continue; - SelectedSpectator = i; - GotNewPlayer = true; + NewSpectatorID = i; + GotNewSpectatorID = true; break; } } } - if(GotNewPlayer) - pSelf->Spectate(SelectedSpectator); + if(GotNewSpectatorID) + pSelf->Spectate(NewSpectatorID); } CSpectator::CSpectator() |