aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NorthstarDLL/engine/hoststate.cpp4
-rw-r--r--NorthstarDLL/mods/modmanager.cpp2
-rw-r--r--NorthstarDLL/mods/modmanager.h2
3 files changed, 7 insertions, 1 deletions
diff --git a/NorthstarDLL/engine/hoststate.cpp b/NorthstarDLL/engine/hoststate.cpp
index 4900539b..d89e6c12 100644
--- a/NorthstarDLL/engine/hoststate.cpp
+++ b/NorthstarDLL/engine/hoststate.cpp
@@ -134,6 +134,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 1c3c416d..d2321583 100644
--- a/NorthstarDLL/mods/modmanager.cpp
+++ b/NorthstarDLL/mods/modmanager.cpp
@@ -1039,7 +1039,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();