1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

Close #19596: Disable replay effects with a startup flag (#22303)

This commit is contained in:
Andrew
2024-07-25 16:29:01 -04:00
committed by GitHub
parent 30a555d3c2
commit df07d9cb2b
6 changed files with 17 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
0.4.13 (in development)
------------------------------------------------------------------------
- Feature: [#19596] Allow for playing back a replay without camera movement or alert box.
- Feature: [#20831] The ride selection window now shows object authors if debugging tools are active.
- Feature: [#20832] The ride music tab now shows a track listing for the current music style.
- Feature: [#22172] [Plugin] Expose ride satisfaction ratings to the plugin API.

View File

@@ -28,3 +28,5 @@ uint32_t gCurrentDrawCount = 0;
uint8_t gScreenFlags;
uint32_t gScreenAge;
PromptMode gSavePromptMode;
bool gSilentReplays = false;

View File

@@ -48,6 +48,7 @@ extern bool gOpenRCT2NoGraphics;
extern bool gOpenRCT2ShowChangelog;
extern bool gOpenRCT2SilentBreakpad;
extern u8string gSilentRecordingName;
extern bool gSilentReplays;
#ifndef DISABLE_NETWORK
extern int32_t gNetworkStart;

View File

@@ -184,7 +184,10 @@ namespace OpenRCT2
#ifndef DISABLE_NETWORK
// If the network is disabled we will only get a dummy hash which will cause
// false positives during replay.
if (!gSilentReplays)
{
CheckState();
}
#endif
ReplayCommands();
@@ -870,7 +873,7 @@ namespace OpenRCT2
}
// Focus camera on event.
if (isPositionValid && !result.Position.IsNull())
if (!gSilentReplays && isPositionValid && !result.Position.IsNull())
{
auto* mainWindow = WindowGetMain();
if (mainWindow != nullptr)

View File

@@ -56,6 +56,7 @@ static bool _all = false;
static bool _about = false;
static bool _verbose = false;
static bool _headless = false;
static bool _silentReplays = false;
static u8string _password = {};
static u8string _userDataPath = {};
static u8string _openrct2DataPath = {};
@@ -73,6 +74,7 @@ static constexpr CommandLineOptionDefinition StandardOptions[]
{ CMDLINE_TYPE_SWITCH, &_about, NAC, "about", "show information about " OPENRCT2_NAME },
{ CMDLINE_TYPE_SWITCH, &_verbose, NAC, "verbose", "log verbose messages" },
{ CMDLINE_TYPE_SWITCH, &_headless, NAC, "headless", "run " OPENRCT2_NAME " headless" IMPLIES_SILENT_BREAKPAD },
{ CMDLINE_TYPE_SWITCH, &_silentReplays, NAC, "silent-replays", "use unobtrusive replays" },
#ifndef DISABLE_NETWORK
{ CMDLINE_TYPE_INTEGER, &_port, NAC, "port", "port to use for hosting or joining a server" },
{ CMDLINE_TYPE_STRING, &_address, NAC, "address", "address to listen on when hosting a server" },
@@ -224,6 +226,11 @@ exitcode_t CommandLine::HandleCommandDefault()
gCustomPassword = _password;
}
if (_silentReplays)
{
gSilentReplays = _silentReplays;
}
return result;
}

View File

@@ -65,7 +65,7 @@ void Painter::Paint(IDrawingEngine& de)
auto* replayManager = GetContext()->GetReplayManager();
const char* text = nullptr;
if (replayManager->IsReplaying())
if (replayManager->IsReplaying() && !gSilentReplays)
text = "Replaying...";
else if (replayManager->ShouldDisplayNotice())
text = "Recording...";