From 92b0b90b29785c6a4f492c08a330f291ee9a2bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Mon, 29 Jul 2024 21:40:03 +0200 Subject: [PATCH] Remove unused `CClient::DirectInput` function The function is unused and because the message is not flushed it would also not have worked correctly. The `NETMSG_INPUT` message is already packed and flushed in the `CClient::SendInput` function. Closes #8408. --- src/engine/client/client.cpp | 13 ------------- src/engine/client/client.h | 1 - 2 files changed, 14 deletions(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 87df1a291..8155b7104 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -236,19 +236,6 @@ bool CClient::ConnectionProblems() const return m_aNetClient[g_Config.m_ClDummy].GotProblems(MaxLatencyTicks() * time_freq() / GameTickSpeed()) != 0; } -void CClient::DirectInput(int *pInput, int Size) -{ - CMsgPacker Msg(NETMSG_INPUT, true); - Msg.AddInt(m_aAckGameTick[g_Config.m_ClDummy]); - Msg.AddInt(m_aPredTick[g_Config.m_ClDummy]); - Msg.AddInt(Size); - - for(int i = 0; i < Size / 4; i++) - Msg.AddInt(pInput[i]); - - SendMsgActive(&Msg, 0); -} - void CClient::SendInput() { int64_t Now = time_get(); diff --git a/src/engine/client/client.h b/src/engine/client/client.h index 526bd1b4d..8c17cf8cb 100644 --- a/src/engine/client/client.h +++ b/src/engine/client/client.h @@ -294,7 +294,6 @@ public: IGraphics::CTextureHandle GetDebugFont() const override { return m_DebugFont; } - void DirectInput(int *pInput, int Size); void SendInput(); // TODO: OPT: do this a lot smarter!