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

Fix custom RCT1 scenarios potentially being confused with official ones (#24832)

This commit is contained in:
Aaron van Geffen
2025-07-24 20:12:35 +02:00
committed by GitHub
parent 8681b7f18a
commit 975b64a7fd
2 changed files with 9 additions and 1 deletions

View File

@@ -13,6 +13,7 @@
- Fix: [#24824] The Air Powered Vertical Coaster top section track piece has vertical tunnels (original bug).
- Fix: [#24825] The River Rapids flat-to-gentle track piece tunnels are incorrect on the gentle side.
- Fix: [#24826] The Junior Roller Coaster flat-to-steep track piece tunnels are incorrect.
- Fix: [#24831] Park names are being overwritten for custom RCT1 scenarios that use competition id slots.
0.4.24 (2025-07-05)
------------------------------------------------------------------------

View File

@@ -2424,7 +2424,14 @@ namespace OpenRCT2::RCT1
if (scNumber != -1)
{
SourceDescriptor desc;
if (ScenarioSources::TryGetById(scNumber, &desc) && !desc.textObjectId.empty())
// If no entry is found, this is a custom scenario
bool isOfficial = ScenarioSources::TryGetById(_s4.ScenarioSlotIndex, &desc);
// Perform an additional name check if this is detected to be a competition scenario
if (isOfficial && desc.category == ScenarioCategory::competitions)
isOfficial = ScenarioSources::TryGetByName(_s4.ScenarioName, &desc);
if (isOfficial && !desc.textObjectId.empty())
{
auto& objManager = GetContext()->GetObjectManager();