1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Fix #10256: Desync because of client advancing ahead of server ticks during map change (#10257)

This commit is contained in:
ζeh Matt
2019-11-17 23:26:32 +01:00
committed by Michael Steenbeek
parent 5606b4895b
commit 7744fc71e4
3 changed files with 8 additions and 1 deletions

View File

@@ -37,6 +37,7 @@
- Fix: [#10106] Ride circuits should not be used for modes that do not support it.
- Fix: [#10149] Desync in headless mode with rides that create smoke particles.
- Fix: [#10249] Desync because of ride crashes and simulation mode.
- Fix: [#10256] Desync because of advancing ahead of server ticks during map change.
- Improved: [#9466] Add the rain weather effect to the OpenGL renderer.
- Improved: [#9987] Minimum load rounding.
- Improved: [#10125] Better support for high DPI screens.

View File

@@ -245,6 +245,12 @@ void GameState::UpdateLogic()
}
else if (network_get_mode() == NETWORK_MODE_CLIENT)
{
// Don't run past the server, this condition can happen during map changes.
if (network_get_server_tick() == gCurrentTicks)
{
return;
}
// Check desync.
bool desynced = network_check_desynchronisation();
if (desynced)

View File

@@ -31,7 +31,7 @@
// This string specifies which version of network stream current build uses.
// It is used for making sure only compatible builds get connected, even within
// single OpenRCT2 version.
#define NETWORK_STREAM_VERSION "1"
#define NETWORK_STREAM_VERSION "2"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
static Peep* _pickup_peep = nullptr;