Skip to content

Commit

Permalink
Change incorrectly named OnClientDirectInput function
Browse files Browse the repository at this point in the history
This has not done any Direct Input since ddnet#1441
  • Loading branch information
sjrc6 committed Jun 2, 2024
1 parent c90dbe5 commit e3723d3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/engine/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ class IGameServer : public IInterface
virtual void OnClientEnter(int ClientId) = 0;
virtual void OnClientDrop(int ClientId, const char *pReason) = 0;
virtual void OnClientPrepareInput(int ClientId, void *pInput) = 0;
virtual void OnClientDirectInput(int ClientId, void *pInput) = 0;
virtual void OnClientFreshInput(int ClientId, void *pInput) = 0;
virtual void OnClientPredictedInput(int ClientId, void *pInput) = 0;
virtual void OnClientPredictedEarlyInput(int ClientId, void *pInput) = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/engine/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1686,7 +1686,7 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket)

// call the mod with the fresh input data
if(m_aClients[ClientId].m_State == CClient::STATE_INGAME)
GameServer()->OnClientDirectInput(ClientId, LatestInput.m_aData);
GameServer()->OnClientFreshInput(ClientId, LatestInput.m_aData);
}
else if(Msg == NETMSG_RCON_CMD)
{
Expand Down
4 changes: 2 additions & 2 deletions src/game/server/gamecontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1302,8 +1302,8 @@ void CGameContext::OnClientPrepareInput(int ClientId, void *pInput)
pPlayerInput->m_PlayerFlags = PlayerFlags_SevenToSix(pPlayerInput->m_PlayerFlags);
}

// Called on all incoming NETMSG_INPUT, only sets player flags and tracks afk status. Does not perform a DirectInput
void CGameContext::OnClientDirectInput(int ClientId, void *pInput)
// Called on all incoming NETMSG_INPUT, only sets player flags and tracks afk status.
void CGameContext::OnClientFreshInput(int ClientId, void *pInput)
{
if(!m_World.m_Paused)
m_apPlayers[ClientId]->OnPlayerFreshInput((CNetObj_PlayerInput *)pInput);
Expand Down
2 changes: 1 addition & 1 deletion src/game/server/gamecontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ class CGameContext : public IGameServer
void OnClientEnter(int ClientId) override;
void OnClientDrop(int ClientId, const char *pReason) override;
void OnClientPrepareInput(int ClientId, void *pInput) override;
void OnClientDirectInput(int ClientId, void *pInput) override;
void OnClientFreshInput(int ClientId, void *pInput) override;
void OnClientPredictedInput(int ClientId, void *pInput) override;
void OnClientPredictedEarlyInput(int ClientId, void *pInput) override;

Expand Down

0 comments on commit e3723d3

Please sign in to comment.