diff --git a/src/game.c b/src/game.c index e080552abf..1ad3fbadee 100644 --- a/src/game.c +++ b/src/game.c @@ -262,11 +262,6 @@ void game_update() // make sure client doesn't fall behind the server too much numUpdates += 10; } - - if (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_TICKS, uint32) >= network_get_server_tick()) { - // dont run past the server - numUpdates = 0; - } } else { if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) != 0) { numUpdates = 0; @@ -333,6 +328,12 @@ void game_update() void game_logic_update() { + if (network_get_mode() == NETWORK_MODE_CLIENT) { + if (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_TICKS, uint32) >= network_get_server_tick()) { + // dont run past the server + return; + } + } RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_TICKS, uint32)++; RCT2_GLOBAL(RCT2_ADDRESS_SCENARIO_TICKS, uint32)++; RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_AGE, sint16)++; diff --git a/src/network/network.cpp b/src/network/network.cpp index 522b81fafd..8424c067a7 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -536,7 +536,7 @@ bool Network::CheckSRAND(uint32 tick, uint32 srand0) if (server_srand0_tick == 0) return true; - if (tick >= server_srand0_tick) { + if (tick > server_srand0_tick) { // this should not happen server_srand0_tick = 0; return true; }