mirror of https://github.com/OpenRCT2/OpenRCT2.git
Add GAME_COMMAND_FLAG_REPLAY
This commit is contained in:
parent
624427259b
commit
6e8216d7c7
|
@ -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
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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());
|
||||||
|
|
Loading…
Reference in New Issue