From 6e8216d7c7d3ad9ace7533d8a0a4154c8c4075a1 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 6 Dec 2018 08:38:28 +0100 Subject: [PATCH] Add GAME_COMMAND_FLAG_REPLAY --- src/openrct2/Game.h | 1 + src/openrct2/ReplayManager.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openrct2/Game.h b/src/openrct2/Game.h index d2138b4430..2a2ac20a6c 100644 --- a/src/openrct2/Game.h +++ b/src/openrct2/Game.h @@ -105,6 +105,7 @@ enum : uint32_t GAME_COMMAND_FLAG_5 = (1 << 5), GAME_COMMAND_FLAG_GHOST = (1 << 6), GAME_COMMAND_FLAG_PATH_SCENERY = (1 << 7), + GAME_COMMAND_FLAG_REPLAY = (1u << 30), // Command was issued from replay manager. GAME_COMMAND_FLAG_NETWORKED = (1u << 31) // Game command is coming from network }; diff --git a/src/openrct2/ReplayManager.cpp b/src/openrct2/ReplayManager.cpp index 535281d011..bf6711e5e5 100644 --- a/src/openrct2/ReplayManager.cpp +++ b/src/openrct2/ReplayManager.cpp @@ -428,7 +428,7 @@ namespace OpenRCT2 if (command.action != nullptr) { GameAction* action = command.action.get(); - action->SetFlags(action->GetFlags()); + action->SetFlags(action->GetFlags() | GAME_COMMAND_FLAG_REPLAY); Guard::Assert(action != nullptr); @@ -436,7 +436,8 @@ namespace OpenRCT2 } else { - game_do_command(command.eax, command.ebx, command.ecx, command.edx, command.esi, command.edi, command.ebp); + uint32_t flags = command.ebx | GAME_COMMAND_FLAG_REPLAY; + game_do_command(command.eax, flags, command.ecx, command.edx, command.esi, command.edi, command.ebp); } replayQueue.erase(replayQueue.begin());