diff options
| author | oy <Tom_Adams@web.de> | 2011-03-01 18:31:20 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-03-01 18:31:20 +0100 |
| commit | 4bede550be18cfc9bb4df669c147032917160066 (patch) | |
| tree | 56652609b0a47df5e1cf27abbbaf8a3d5cf9756d /src/game/client/components | |
| parent | 0bc13c91ebcc6404fc67e079e5a9acad10176c98 (diff) | |
| download | zcatch-4bede550be18cfc9bb4df669c147032917160066.tar.gz zcatch-4bede550be18cfc9bb4df669c147032917160066.zip | |
only update the ping if the scoreboard is active. Closes #27
Diffstat (limited to 'src/game/client/components')
| -rw-r--r-- | src/game/client/components/controls.cpp | 17 | ||||
| -rw-r--r-- | src/game/client/components/players.cpp | 2 |
2 files changed, 11 insertions, 8 deletions
diff --git a/src/game/client/components/controls.cpp b/src/game/client/components/controls.cpp index f7da46b6..479bba22 100644 --- a/src/game/client/components/controls.cpp +++ b/src/game/client/components/controls.cpp @@ -9,6 +9,7 @@ #include <game/client/component.h> #include <game/client/components/chat.h> #include <game/client/components/menus.h> +#include <game/client/components/scoreboard.h> #include "controls.h" @@ -112,19 +113,22 @@ int CControls::SnapInput(int *pData) // update player state if(m_pClient->m_pChat->IsActive()) - m_InputData.m_PlayerState = PLAYERSTATE_CHATTING; + m_InputData.m_PlayerFlags = PLAYERFLAG_CHATTING; else if(m_pClient->m_pMenus->IsActive()) - m_InputData.m_PlayerState = PLAYERSTATE_IN_MENU; + m_InputData.m_PlayerFlags = PLAYERFLAG_IN_MENU; else - m_InputData.m_PlayerState = PLAYERSTATE_PLAYING; + m_InputData.m_PlayerFlags = PLAYERFLAG_PLAYING; - if(m_LastData.m_PlayerState != m_InputData.m_PlayerState) + if(m_pClient->m_pScoreboard->Active()) + m_InputData.m_PlayerFlags |= PLAYERFLAG_SCOREBOARD; + + if(m_LastData.m_PlayerFlags != m_InputData.m_PlayerFlags) Send = true; - m_LastData.m_PlayerState = m_InputData.m_PlayerState; + m_LastData.m_PlayerFlags = m_InputData.m_PlayerFlags; // we freeze the input if chat or menu is activated - if(m_InputData.m_PlayerState != PLAYERSTATE_PLAYING) + if(!(m_InputData.m_PlayerFlags&PLAYERFLAG_PLAYING)) { OnReset(); @@ -172,7 +176,6 @@ int CControls::SnapInput(int *pData) else if(m_InputData.m_Jump != m_LastData.m_Jump) Send = true; else if(m_InputData.m_Fire != m_LastData.m_Fire) Send = true; else if(m_InputData.m_Hook != m_LastData.m_Hook) Send = true; - else if(m_InputData.m_PlayerState != m_LastData.m_PlayerState) Send = true; else if(m_InputData.m_WantedWeapon != m_LastData.m_WantedWeapon) Send = true; else if(m_InputData.m_NextWeapon != m_LastData.m_NextWeapon) Send = true; else if(m_InputData.m_PrevWeapon != m_LastData.m_PrevWeapon) Send = true; diff --git a/src/game/client/components/players.cpp b/src/game/client/components/players.cpp index 40197e9f..cbbc8d99 100644 --- a/src/game/client/components/players.cpp +++ b/src/game/client/components/players.cpp @@ -500,7 +500,7 @@ void CPlayers::RenderPlayer( RenderInfo.m_ColorFeet.a = 1.0f; RenderTools()->RenderTee(&State, &RenderInfo, Player.m_Emote, Direction, Position); - if(Player.m_PlayerState == PLAYERSTATE_CHATTING) + if(Player.m_PlayerFlags&PLAYERFLAG_CHATTING) { Graphics()->TextureSet(g_pData->m_aImages[IMAGE_EMOTICONS].m_Id); Graphics()->QuadsBegin(); |