Skip to content

Commit

Permalink
Replace current scene with main menu on load
Browse files Browse the repository at this point in the history
  • Loading branch information
psyGamer committed Mar 1, 2024
1 parent 1da43f6 commit 8356575
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Source/TAS/Input/Commands/LoadCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ private static void LoadCmd(string[] args)
CheckPoint = args.Length <= 1 ? "Start" : args[1],
Submap = false, // TODO
Reason = World.EntryReasons.Entered,
} ;
};

// We need to change the current scene to the main menu,
// since otherwise an input on the first frame would get consumed by the previous scene.
if (Game.Instance.scenes.TryPop(out _))
{
Game.Instance.scenes.Push(new Overworld(true));
}

Game.Instance.Goto(new Transition()
{
Expand Down

0 comments on commit 8356575

Please sign in to comment.