From e3145c09f2c305bc43f5bc496ed79886a8fe7182 Mon Sep 17 00:00:00 2001 From: Misa Date: Tue, 13 Apr 2021 20:00:07 -0700 Subject: [PATCH] Reset cliplaytest when exiting to menu and check it when loading This fixes a bug where quitting to the menu from command-line playtesting with -playassets specified would always use those assets when loading back in to any custom level. This also fixes loading in to a custom level quicksave always using the command-line playtesting arguments instead of using the actual quicksave. --- desktop_version/src/Game.cpp | 1 + desktop_version/src/editor.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 766d2069..4a6af077 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -6601,6 +6601,7 @@ void Game::quittomenu(void) gamestate = TITLEMODE; graphics.fademode = 4; FILESYSTEM_unmountAssets(); + cliplaytest = false; graphics.titlebg.tdrawback = true; graphics.flipmode = false; //Don't be stuck on the summary screen, diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp index d3eca1f0..1720618f 100644 --- a/desktop_version/src/editor.cpp +++ b/desktop_version/src/editor.cpp @@ -1751,7 +1751,7 @@ bool editorclass::load(std::string& _path) } FILESYSTEM_unmountAssets(); - if (game.playassets != "") + if (game.cliplaytest && game.playassets != "") { FILESYSTEM_mountAssets(game.playassets.c_str()); }