From f4e99b30f02bdb0e3f1d64d2c2e535864a711320 Mon Sep 17 00:00:00 2001 From: RandomityGuy <31925790+RandomityGuy@users.noreply.github.com> Date: Sun, 14 Jul 2024 23:42:02 +0530 Subject: [PATCH] persist selection and fix music bug --- src/ResourceLoader.hx | 3 +++ src/gui/MPPlayMissionGui.hx | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ResourceLoader.hx b/src/ResourceLoader.hx index 006b0622..0f260c74 100644 --- a/src/ResourceLoader.hx +++ b/src/ResourceLoader.hx @@ -537,6 +537,9 @@ class ResourceLoader { } public static function exists(path:String) { + #if (js || android) + path = StringTools.replace(path, "data/", ""); + #end if (zipFilesystem.exists(path.toLowerCase())) return true; return fileSystem.exists(path); diff --git a/src/gui/MPPlayMissionGui.hx b/src/gui/MPPlayMissionGui.hx index c265451a..9a9ec57b 100644 --- a/src/gui/MPPlayMissionGui.hx +++ b/src/gui/MPPlayMissionGui.hx @@ -642,7 +642,12 @@ class MPPlayMissionGui extends GuiImage { currentList = MissionList.missionList["multiplayer"]["beginner"]; - setCategoryFunc(currentCategoryStatic, null, false); + // setCategoryFunc(currentCategoryStatic, null, false); + if (Net.isHost) { + NetCommands.setLobbyLevelIndex(currentCategoryStatic, currentSelectionStatic); + } else { + setCategoryFunc(currentCategoryStatic, null, false); + } updateLobbyNames(); redrawChat(); }