From 8973e35ba1eae363985cdfa6a5f4d36870dea7cc Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Wed, 1 May 2024 12:34:10 +0200 Subject: [PATCH] Stabilize scenario and track editors\ --- src/openrct2/Editor.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/openrct2/Editor.cpp b/src/openrct2/Editor.cpp index 0e4ebbb8a2..fd52e4e5f5 100644 --- a/src/openrct2/Editor.cpp +++ b/src/openrct2/Editor.cpp @@ -102,6 +102,10 @@ namespace Editor */ void Load() { + // TODO: replace with dedicated scene + auto* context = GetContext(); + context->SetActiveScene(context->GetGameScene()); + auto& gameState = GetGameState(); Audio::StopAll(); ObjectListLoad(); @@ -161,6 +165,10 @@ namespace Editor */ void LoadTrackDesigner() { + // TODO: replace with dedicated scene + auto* context = GetContext(); + context->SetActiveScene(context->GetGameScene()); + Audio::StopAll(); gScreenFlags = SCREEN_FLAGS_TRACK_DESIGNER; gScreenAge = 0; @@ -182,6 +190,10 @@ namespace Editor */ void LoadTrackManager() { + // TODO: replace with dedicated scene + auto* context = GetContext(); + context->SetActiveScene(context->GetGameScene()); + Audio::StopAll(); gScreenFlags = SCREEN_FLAGS_TRACK_MANAGER; gScreenAge = 0; @@ -244,6 +256,10 @@ namespace Editor { ClearMapForEditing(loadedFromSave); + // TODO: replace with dedicated scene + auto* context = GetContext(); + context->SetActiveScene(context->GetGameScene()); + GetGameState().EditorStep = EditorStep::LandscapeEditor; gScreenAge = 0; gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR;