From cba6238ede09c837d2dd2d8a42f1d3133bfbc41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Thu, 1 Jun 2023 01:20:31 +0300 Subject: [PATCH] Queue game actions when issued from UI --- src/openrct2/actions/GameAction.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/openrct2/actions/GameAction.cpp b/src/openrct2/actions/GameAction.cpp index c4cda77ac6..637a61520f 100644 --- a/src/openrct2/actions/GameAction.cpp +++ b/src/openrct2/actions/GameAction.cpp @@ -334,10 +334,11 @@ namespace GameActions return result; } } - else if (NetworkGetMode() == NETWORK_MODE_SERVER) + else if (NetworkGetMode() == NETWORK_MODE_SERVER || !gInUpdateCode) { // If player is the server it would execute right away as where clients execute the commands // at the beginning of the frame, so we have to put them into the queue. + // This is also the case when its executed from the UI update. if (!(actionFlags & GameActions::Flags::ClientOnly) && !(flags & GAME_COMMAND_FLAG_NETWORKED)) { LOG_VERBOSE("[%s] GameAction::Execute %s (Queue)", GetRealm(), action->GetName());