1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Index and load objects after the editor scene is initialized not before (#24953)

* Index and load objects after the editor scene is initialized not before

* Remove pointless calls and cleanup

* Display the progress window when loading the editor

* Update changelog.txt
This commit is contained in:
Matt
2025-08-11 23:51:39 +03:00
committed by GitHub
parent 81e956bbfd
commit d26252c883
2 changed files with 14 additions and 9 deletions

View File

@@ -3,9 +3,11 @@
- Improved: [#24734] Save files now use Zstd compression for faster saving and smaller files.
- Improved: [#24893] The ride list now has headers, and can be sorted in both directions.
- Improved: [#24921] The command line sprite build command now prints out the images table entry for the compiled sprite file.
- Improved: [#24953] Opening the Scenario Editor, Track Designer or Track Designs Manager now display the progress bar.
- Fix: [#16988] AppImage version does not show changelog.
- Fix: [#24173] Allow all game speeds between 1 and 8 if developer mode is on.
- Fix: [#24915] LIM Launched (original bug), Corkscrew and Twister Roller Coaster inline twists have some incorrect tunnels.
- Fix: [#24953] Crash when opening the Scenario Editor, Track Designer or Track Designs Manager.
0.4.25 (2025-08-03)
------------------------------------------------------------------------

View File

@@ -65,6 +65,7 @@ namespace OpenRCT2::Editor
static void ObjectListLoad()
{
auto* context = GetContext();
context->OpenProgress(STR_LOADING_GENERIC);
// Unload objects first, the repository is re-populated which owns the objects.
auto& objectManager = context->GetObjectManager();
@@ -83,6 +84,8 @@ namespace OpenRCT2::Editor
{
objectManager.LoadObject(entry);
}
context->CloseProgress();
}
static WindowBase* OpenEditorWindows()
@@ -105,12 +108,12 @@ namespace OpenRCT2::Editor
auto& gameState = getGameState();
Audio::StopAll();
ObjectListLoad();
gameStateInitAll(gameState, kDefaultMapSize);
gLegacyScene = LegacyScene::scenarioEditor;
gameState.editorStep = EditorStep::ObjectSelection;
gameState.park.Flags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
gameState.scenarioCategory = ScenarioCategory::other;
ObjectListLoad();
ViewportInitAll();
WindowBase* mainWindow = OpenEditorWindows();
mainWindow->SetViewportLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ());
@@ -183,11 +186,11 @@ namespace OpenRCT2::Editor
gLegacyScene = LegacyScene::trackDesigner;
gScreenAge = 0;
ObjectManagerUnloadAllObjects();
ObjectListLoad();
gameStateInitAll(getGameState(), kDefaultMapSize);
auto& gameState = getGameState();
gameStateInitAll(gameState, kDefaultMapSize);
gameState.editorStep = EditorStep::ObjectSelection;
SetAllLandOwned();
getGameState().editorStep = EditorStep::ObjectSelection;
ObjectListLoad();
ViewportInitAll();
WindowBase* mainWindow = OpenEditorWindows();
mainWindow->SetViewportLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ());
@@ -211,11 +214,11 @@ namespace OpenRCT2::Editor
gLegacyScene = LegacyScene::trackDesignsManager;
gScreenAge = 0;
ObjectManagerUnloadAllObjects();
ObjectListLoad();
gameStateInitAll(getGameState(), kDefaultMapSize);
auto& gameState = getGameState();
gameStateInitAll(gameState, kDefaultMapSize);
SetAllLandOwned();
getGameState().editorStep = EditorStep::ObjectSelection;
gameState.editorStep = EditorStep::ObjectSelection;
ObjectListLoad();
ViewportInitAll();
WindowBase* mainWindow = OpenEditorWindows();
mainWindow->SetViewportLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ());