Add GAME_COMMAND_FLAG_REPLAY

This commit is contained in:
Matt 2018-12-06 08:38:28 +01:00
parent 624427259b
commit 6e8216d7c7
2 changed files with 4 additions and 2 deletions

View File

@ -105,6 +105,7 @@ enum : uint32_t
GAME_COMMAND_FLAG_5 = (1 << 5), GAME_COMMAND_FLAG_5 = (1 << 5),
GAME_COMMAND_FLAG_GHOST = (1 << 6), GAME_COMMAND_FLAG_GHOST = (1 << 6),
GAME_COMMAND_FLAG_PATH_SCENERY = (1 << 7), 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 GAME_COMMAND_FLAG_NETWORKED = (1u << 31) // Game command is coming from network
}; };

View File

@ -428,7 +428,7 @@ namespace OpenRCT2
if (command.action != nullptr) if (command.action != nullptr)
{ {
GameAction* action = command.action.get(); GameAction* action = command.action.get();
action->SetFlags(action->GetFlags()); action->SetFlags(action->GetFlags() | GAME_COMMAND_FLAG_REPLAY);
Guard::Assert(action != nullptr); Guard::Assert(action != nullptr);
@ -436,7 +436,8 @@ namespace OpenRCT2
} }
else 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()); replayQueue.erase(replayQueue.begin());