mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Ignore user inputs when paused
This commit is contained in:
parent
93b57433b4
commit
bb6c3ba951
|
@ -33,6 +33,7 @@ protected:
|
|||
class CCollision *Collision() const { return m_pClient->Collision(); }
|
||||
public:
|
||||
virtual ~CComponent() {}
|
||||
class CGameClient *GameClient() const { return m_pClient; }
|
||||
class IClient *Client() const { return m_pClient->Client(); }
|
||||
|
||||
virtual void OnStateChange(int NewState, int OldState) {};
|
||||
|
|
|
@ -123,6 +123,10 @@ struct CInputState
|
|||
static void ConKeyInputState(IConsole::IResult *pResult, void *pUserData)
|
||||
{
|
||||
CInputState *pState = (CInputState *)pUserData;
|
||||
|
||||
if (pState->m_pControls->GameClient()->m_Snap.m_SpecInfo.m_Active)
|
||||
return;
|
||||
|
||||
if (g_Config.m_ClDummy)
|
||||
*pState->m_pVariable2 = pResult->GetInteger(0);
|
||||
else
|
||||
|
@ -132,6 +136,10 @@ static void ConKeyInputState(IConsole::IResult *pResult, void *pUserData)
|
|||
static void ConKeyInputCounter(IConsole::IResult *pResult, void *pUserData)
|
||||
{
|
||||
CInputState *pState = (CInputState *)pUserData;
|
||||
|
||||
if (pState->m_pControls->GameClient()->m_Snap.m_SpecInfo.m_Active)
|
||||
return;
|
||||
|
||||
int *v;
|
||||
if (g_Config.m_ClDummy)
|
||||
v = pState->m_pVariable2;
|
||||
|
|
Loading…
Reference in a new issue