MCPcopy Create free account
hub / github.com/ddnet/ddnet / ConKeyInputCounter

Method ConKeyInputCounter

src/game/client/components/controls.cpp:76–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void CControls::ConKeyInputCounter(IConsole::IResult *pResult, void *pUserData)
77{
78 CInputState *pState = (CInputState *)pUserData;
79
80 if((pState->m_pControls->GameClient()->m_GameInfo.m_BugDDRaceInput && pState->m_pControls->GameClient()->m_Snap.m_SpecInfo.m_Active) || pState->m_pControls->GameClient()->m_Spectator.IsActive())
81 return;
82
83 int *pVariable = pState->m_apVariables[g_Config.m_ClDummy];
84 if(((*pVariable) & 1) != pResult->GetInteger(0))
85 (*pVariable)++;
86 *pVariable &= INPUT_STATE_MASK;
87}
88
89struct CInputSet
90{

Callers

nothing calls this directly

Calls 3

GameClientMethod · 0.45
IsActiveMethod · 0.45
GetIntegerMethod · 0.45

Tested by

no test coverage detected