From c333ba84bee44549bb15675f353e04d22fb9f53c Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 11 Feb 2023 03:08:43 +0000 Subject: commit for merge --- NorthstarDLL/client/audio.h | 2 -- NorthstarDLL/client/clientvideooverrides.cpp | 10 +++++----- NorthstarDLL/client/modlocalisation.cpp | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) (limited to 'NorthstarDLL/client') diff --git a/NorthstarDLL/client/audio.h b/NorthstarDLL/client/audio.h index 26cda205..915d52ce 100644 --- a/NorthstarDLL/client/audio.h +++ b/NorthstarDLL/client/audio.h @@ -1,7 +1,5 @@ #pragma once -#include -#include #include #include diff --git a/NorthstarDLL/client/clientvideooverrides.cpp b/NorthstarDLL/client/clientvideooverrides.cpp index 1a5924c7..ab78b943 100644 --- a/NorthstarDLL/client/clientvideooverrides.cpp +++ b/NorthstarDLL/client/clientvideooverrides.cpp @@ -12,20 +12,20 @@ void*, __fastcall, (const char* path, uint32_t flags)) spdlog::info("BinkOpen {}", filename); // figure out which mod is handling the bink - Mod* fileOwner = nullptr; - for (Mod& mod : g_pModManager->m_LoadedMods) + Mod* pFileOwner = nullptr; + for (Mod& mod : g_pModManager->GetMods()) { if (!mod.m_bEnabled) continue; if (std::find(mod.BinkVideos.begin(), mod.BinkVideos.end(), filename) != mod.BinkVideos.end()) - fileOwner = &mod; + pFileOwner = &mod; } - if (fileOwner) + if (pFileOwner) { // create new path - fs::path binkPath(fileOwner->m_ModDirectory / "media" / filename); + fs::path binkPath(pFileOwner->m_ModDirectory / "media" / filename); return BinkOpen(binkPath.string().c_str(), flags); } else diff --git a/NorthstarDLL/client/modlocalisation.cpp b/NorthstarDLL/client/modlocalisation.cpp index e5afc793..db138315 100644 --- a/NorthstarDLL/client/modlocalisation.cpp +++ b/NorthstarDLL/client/modlocalisation.cpp @@ -26,7 +26,7 @@ void, __fastcall, (void* pVguiLocalize)) // clang-format on { // load all mod localization manually, so we keep track of all files, not just previously loaded ones - for (Mod mod : g_pModManager->m_LoadedMods) + for (Mod& mod : g_pModManager->GetMods()) if (mod.m_bEnabled) for (std::string& localisationFile : mod.LocalisationFiles) CLocalize__AddFile(g_pVguiLocalize, localisationFile.c_str(), nullptr, false); @@ -44,7 +44,7 @@ void, __fastcall, (void* self)) // previously we did this in CLocalize::AddFile, but for some reason it won't properly overwrite localization from // files loaded previously if done there, very weird but this works so whatever - for (Mod mod : g_pModManager->m_LoadedMods) + for (Mod& mod : g_pModManager->GetMods()) if (mod.m_bEnabled) for (std::string& localisationFile : mod.LocalisationFiles) CLocalize__AddFile(g_pVguiLocalize, localisationFile.c_str(), nullptr, false); -- cgit v1.2.3