Merge pull request #9214 from KebsCS/pr-fix-tuning

Fix invalid prediction tuning in tune zone 0
This commit is contained in:
Dennis Felsing 2024-11-07 06:41:50 +00:00 committed by GitHub
commit 50d8dfeb6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;