mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
Fix: Make inputs work 100% when you're in freeze.
This was random before, now these parts are a lot more reasonable Client-side fix so it works on all servers
This commit is contained in:
parent
89777a294b
commit
c4118a3878
|
@ -474,6 +474,10 @@ void CClient::SendInput()
|
||||||
if(!g_Config.m_ClDummyHammer)
|
if(!g_Config.m_ClDummyHammer)
|
||||||
{
|
{
|
||||||
m_Fire = 25;
|
m_Fire = 25;
|
||||||
|
|
||||||
|
if(!Size && (!DummyInput.m_Direction && !DummyInput.m_Jump && !DummyInput.m_Hook))
|
||||||
|
return;
|
||||||
|
|
||||||
// pack input
|
// pack input
|
||||||
CMsgPacker Msg(NETMSG_INPUT);
|
CMsgPacker Msg(NETMSG_INPUT);
|
||||||
Msg.AddInt(m_AckGameTick[g_Config.m_ClDummy]);
|
Msg.AddInt(m_AckGameTick[g_Config.m_ClDummy]);
|
||||||
|
|
|
@ -200,6 +200,10 @@ int CControls::SnapInput(int *pData)
|
||||||
// send at at least 10hz
|
// send at at least 10hz
|
||||||
if(time_get() > LastSendTime + time_freq()/25)
|
if(time_get() > LastSendTime + time_freq()/25)
|
||||||
Send = true;
|
Send = true;
|
||||||
|
|
||||||
|
if(m_pClient->m_Snap.m_pLocalCharacter && m_pClient->m_Snap.m_pLocalCharacter->m_Weapon == WEAPON_NINJA
|
||||||
|
&& (m_InputData.m_Direction || m_InputData.m_Jump || m_InputData.m_Hook))
|
||||||
|
Send = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy and return size
|
// copy and return size
|
||||||
|
|
Loading…
Reference in a new issue