mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-15 04:28:20 +00:00
Fix invalid prediction tuning in tune zone 0
This commit is contained in:
parent
15cd607a2d
commit
eb3b850ba9
|
@ -608,7 +608,7 @@ void CGameClient::OnReset()
|
||||||
|
|
||||||
// m_Snap was cleared in InvalidateSnapshot
|
// m_Snap was cleared in InvalidateSnapshot
|
||||||
|
|
||||||
std::fill(std::begin(m_aLocalTuneZone), std::end(m_aLocalTuneZone), 0);
|
std::fill(std::begin(m_aLocalTuneZone), std::end(m_aLocalTuneZone), -1);
|
||||||
std::fill(std::begin(m_aReceivedTuning), std::end(m_aReceivedTuning), false);
|
std::fill(std::begin(m_aReceivedTuning), std::end(m_aReceivedTuning), false);
|
||||||
std::fill(std::begin(m_aExpectingTuningForZone), std::end(m_aExpectingTuningForZone), -1);
|
std::fill(std::begin(m_aExpectingTuningForZone), std::end(m_aExpectingTuningForZone), -1);
|
||||||
std::fill(std::begin(m_aExpectingTuningSince), std::end(m_aExpectingTuningSince), 0);
|
std::fill(std::begin(m_aExpectingTuningSince), std::end(m_aExpectingTuningSince), 0);
|
||||||
|
@ -959,7 +959,6 @@ void CGameClient::OnMessage(int MsgId, CUnpacker *pUnpacker, int Conn, bool Dumm
|
||||||
m_aReceivedTuning[Conn] = true;
|
m_aReceivedTuning[Conn] = true;
|
||||||
// apply new tuning
|
// apply new tuning
|
||||||
m_aTuning[Conn] = NewTuning;
|
m_aTuning[Conn] = NewTuning;
|
||||||
TuningList()[0] = NewTuning;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2895,6 +2894,7 @@ void CGameClient::UpdatePrediction()
|
||||||
{
|
{
|
||||||
if(m_aReceivedTuning[g_Config.m_ClDummy])
|
if(m_aReceivedTuning[g_Config.m_ClDummy])
|
||||||
{
|
{
|
||||||
|
TuningList()[m_aExpectingTuningForZone[g_Config.m_ClDummy]] = m_aTuning[g_Config.m_ClDummy];
|
||||||
m_GameWorld.TuningList()[m_aExpectingTuningForZone[g_Config.m_ClDummy]] = m_aTuning[g_Config.m_ClDummy];
|
m_GameWorld.TuningList()[m_aExpectingTuningForZone[g_Config.m_ClDummy]] = m_aTuning[g_Config.m_ClDummy];
|
||||||
m_aReceivedTuning[g_Config.m_ClDummy] = false;
|
m_aReceivedTuning[g_Config.m_ClDummy] = false;
|
||||||
m_aExpectingTuningForZone[g_Config.m_ClDummy] = -1;
|
m_aExpectingTuningForZone[g_Config.m_ClDummy] = -1;
|
||||||
|
|
Loading…
Reference in a new issue