1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +01:00

Fix #19243: .park scenarios don't complete properly (#19411)

* Check for .park scenario during scenario completion

* Update changelog

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
This commit is contained in:
kyphii
2023-02-16 00:39:31 -05:00
committed by GitHub
parent 583b4ed0e6
commit a428f20d46
2 changed files with 7 additions and 1 deletions

View File

@@ -41,6 +41,7 @@
- Fix: [#19112] Text boxes not updated with empty strings in Track List, Server List, and Start Server windows.
- Fix: [#19114] [Plugin] GameActionResult does not comply to API specification.
- Fix: [#19136] SV6 saves with experimental RCT1 paths not imported correctly.
- Fix: [#19243] .park scenarios don't complete properly
- Fix: [#19250] MusicObjects do not free their preview images.
- Fix: [#19292] Overflow in totalRideValue.
- Fix: [#19339] Incorrect import of crashed particles from SV4.

View File

@@ -437,12 +437,12 @@ public:
ScenarioIndexEntry* scenario = GetByFilename(scenarioFileName);
// Check if this is an RCTC scenario that corresponds to a known RCT1/2 scenario or vice versa, see #12626
if (scenario == nullptr)
{
const std::string scenarioBaseName = Path::GetFileNameWithoutExtension(scenarioFileName);
const std::string scenarioExtension = Path::GetExtension(scenarioFileName);
// Check if this is an RCTC scenario that corresponds to a known RCT1/2 scenario or vice versa, see #12626
if (String::Equals(scenarioExtension, ".sea", true))
{
// Get scenario using RCT2 style name of RCTC scenario
@@ -453,6 +453,11 @@ public:
// Get scenario using RCTC style name of RCT2 scenario
scenario = GetByFilename((scenarioBaseName + ".sea").c_str());
}
// gScenarioFileName .Park scenarios is the full file path instead of just <scenarioName.park>, so need to convert
else if (String::Equals(scenarioExtension, ".park", true))
{
scenario = GetByFilename((scenarioBaseName + ".park").c_str());
}
}
if (scenario != nullptr)