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

Method OnClientDirectInput

src/game/server/gamecontext.cpp:1464–1476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1462}
1463
1464void CGameContext::OnClientDirectInput(int ClientId, const void *pInput)
1465{
1466 const CNetObj_PlayerInput *pPlayerInput = static_cast<const CNetObj_PlayerInput *>(pInput);
1467
1468 if(!m_pController->IsGamePaused())
1469 m_apPlayers[ClientId]->OnDirectInput(pPlayerInput);
1470
1471 int Flags = pPlayerInput->m_PlayerFlags;
1472 if((Flags & 256) || (Flags & 512))
1473 {
1474 Server()->Kick(ClientId, "please update your client or use DDNet client");
1475 }
1476}
1477
1478void CGameContext::OnClientPredictedInput(int ClientId, const void *pInput)
1479{

Callers 1

ProcessClientPacketMethod · 0.80

Calls 4

IsGamePausedMethod · 0.80
ServerClass · 0.50
OnDirectInputMethod · 0.45
KickMethod · 0.45

Tested by

no test coverage detected