Stabilize scenario and track editors\

This commit is contained in:
Aaron van Geffen 2024-05-01 12:34:10 +02:00 committed by GitHub
parent ad79699b21
commit 8973e35ba1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 16 additions and 0 deletions

View File

@ -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;