From d6d480a31b9fb547d3f9d1054d8b4dff4a2dd877 Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 23 Aug 2019 23:06:27 +0200 Subject: [PATCH] Fix desyncs because of GameActions ignoring the tick on client --- src/openrct2/actions/GameAction.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/openrct2/actions/GameAction.cpp b/src/openrct2/actions/GameAction.cpp index 4690348510..873dcfd9b3 100644 --- a/src/openrct2/actions/GameAction.cpp +++ b/src/openrct2/actions/GameAction.cpp @@ -132,6 +132,10 @@ namespace GameActions "%08X\n", queued.uniqueId, queued.tick, currentTick); } + else if (queued.tick > currentTick) + { + return; + } } // Remove ghost scenery so it doesn't interfere with incoming network command @@ -293,7 +297,9 @@ namespace GameActions MemoryStream& output = ctx.output; char temp[128] = {}; - snprintf(temp, sizeof(temp), "[%s] GA: %s (%08X) (", GetRealm(), action->GetName(), action->GetType()); + snprintf( + temp, sizeof(temp), "[%s] Tick: %u, GA: %s (%08X) (", GetRealm(), gCurrentTicks, action->GetName(), + action->GetType()); output.Write(temp, strlen(temp));