diff options
-rw-r--r-- | NorthstarDLL/engine/hoststate.cpp | 4 | ||||
-rw-r--r-- | NorthstarDLL/mods/modmanager.cpp | 2 | ||||
-rw-r--r-- | NorthstarDLL/mods/modmanager.h | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/NorthstarDLL/engine/hoststate.cpp b/NorthstarDLL/engine/hoststate.cpp index 44a66113..ec4733d6 100644 --- a/NorthstarDLL/engine/hoststate.cpp +++ b/NorthstarDLL/engine/hoststate.cpp @@ -133,6 +133,10 @@ void, __fastcall, (CHostState* self)) g_pServerPresence->SetMap(g_pHostState->m_levelName); } +// TODO: due to exception in code for singleplayer (see connect command) this func will never run +// when connect is ran on the ip localhost, while connected to a local listen server +// i dont really care + // clang-format off AUTOHOOK(CHostState__State_GameShutdown, engine.dll + 0x16E640, void, __fastcall, (CHostState* self)) diff --git a/NorthstarDLL/mods/modmanager.cpp b/NorthstarDLL/mods/modmanager.cpp index 4c05c0ae..aa96fe5a 100644 --- a/NorthstarDLL/mods/modmanager.cpp +++ b/NorthstarDLL/mods/modmanager.cpp @@ -1038,7 +1038,7 @@ void ModManager::SaveEnabledMods() enabledModsCfg.SetObject(); // add values - for (Mod& mod : GetMods()) + for (Mod& mod : GetMods() | FilterLocal) enabledModsCfg.AddMember(rapidjson_document::StringRefType(mod.Name.c_str()), mod.m_bEnabled, enabledModsCfg.GetAllocator()); // write diff --git a/NorthstarDLL/mods/modmanager.h b/NorthstarDLL/mods/modmanager.h index 0bb696e8..ea5c4105 100644 --- a/NorthstarDLL/mods/modmanager.h +++ b/NorthstarDLL/mods/modmanager.h @@ -225,6 +225,8 @@ class ModManager // for std::views::filter, e.g. for (Mod& mod : g_pModManager::GetMods() | ModManager::FilterEnabled) static inline constexpr auto FilterEnabled = std::views::filter([](Mod& mod) { return mod.m_bEnabled; }); + static inline constexpr auto FilterRemote = std::views::filter([](Mod& mod) { return mod.m_bRemote; }); + static inline constexpr auto FilterLocal = std::views::filter([](Mod& mod) { return !mod.m_bRemote; }); }; fs::path GetModFolderPath(); |