mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
cleaned up player flags
This commit is contained in:
parent
23df3c609e
commit
6b8287f7c7
|
@ -1,7 +1,7 @@
|
|||
from datatypes import *
|
||||
|
||||
Emotes = ["NORMAL", "PAIN", "HAPPY", "SURPRISE", "ANGRY", "BLINK"]
|
||||
PlayerFlags = ["PLAYING", "IN_MENU", "CHATTING", "SCOREBOARD", "READY", "DEAD"]
|
||||
PlayerFlags = ["CHATTING", "SCOREBOARD", "READY", "DEAD"]
|
||||
GameFlags = ["TEAMS", "FLAGS", "SURVIVAL"]
|
||||
GameStateFlags = ["WARMUP", "SUDDENDEATH", "ROUNDOVER", "GAMEOVER", "PAUSED", "STARTCOUNTDOWN"]
|
||||
|
||||
|
|
|
@ -114,10 +114,8 @@ int CControls::SnapInput(int *pData)
|
|||
// update player state
|
||||
if(m_pClient->m_pChat->IsActive())
|
||||
m_InputData.m_PlayerFlags = PLAYERFLAG_CHATTING;
|
||||
else if(m_pClient->m_pMenus->IsActive())
|
||||
m_InputData.m_PlayerFlags = PLAYERFLAG_IN_MENU;
|
||||
else
|
||||
m_InputData.m_PlayerFlags = PLAYERFLAG_PLAYING;
|
||||
m_InputData.m_PlayerFlags = 0;
|
||||
|
||||
if(m_pClient->m_pScoreboard->Active())
|
||||
m_InputData.m_PlayerFlags |= PLAYERFLAG_SCOREBOARD;
|
||||
|
@ -128,7 +126,7 @@ int CControls::SnapInput(int *pData)
|
|||
m_LastData.m_PlayerFlags = m_InputData.m_PlayerFlags;
|
||||
|
||||
// we freeze the input if chat or menu is activated
|
||||
if(!(m_InputData.m_PlayerFlags&PLAYERFLAG_PLAYING))
|
||||
if(m_pClient->m_pChat->IsActive() || m_pClient->m_pMenus->IsActive())
|
||||
{
|
||||
OnReset();
|
||||
|
||||
|
|
Loading…
Reference in a new issue