mirror of
https://github.com/ddnet/ddnet.git
synced 2024-10-20 15:58:18 +00:00
12d3c8245d
Fix game times and prediction not being updated when only exactly two snapshots have been received, due to the conditions `m_aReceivedSnapshots[...] >= 3`. These specific condition are not necessary and replaced with simpler checks whether the current snapshot is set. Some duplicate nested conditions are also removed. Pump the network first in `CClient::Update` before updating anything else, to ensure that snapshots are received from the network client before the game times and prediction are being updated based on the current snapshots. Fix current and previous game tick always being `0` on the first call of `IGameClient::OnNewSnapshot` when two snapshot have been received. Now, the game ticks are properly initialized from the two initial snapshots. Fix old inputs sometimes being used in prediction after changing map because inputs with tick `-1` were not being ignored. Ensure all snapshots and game times are properly cleared when entering the game. |
||
---|---|---|
.. | ||
android | ||
antibot | ||
base | ||
engine | ||
game | ||
macos | ||
masterping | ||
mastersrv | ||
rust-bridge | ||
steam | ||
test | ||
tools |