aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/modlocalisation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/modlocalisation.cpp')
-rw-r--r--NorthstarDedicatedTest/modlocalisation.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/NorthstarDedicatedTest/modlocalisation.cpp b/NorthstarDedicatedTest/modlocalisation.cpp
index b6cb38dd..7774c4b6 100644
--- a/NorthstarDedicatedTest/modlocalisation.cpp
+++ b/NorthstarDedicatedTest/modlocalisation.cpp
@@ -4,29 +4,28 @@
#include "hookutils.h"
#include "modmanager.h"
+
typedef bool (*AddLocalisationFileType)(void* g_pVguiLocalize, const char* path, const char* pathId, char unknown);
AddLocalisationFileType AddLocalisationFile;
-
-bool loadModLocalisationFiles = true;
-
bool AddLocalisationFileHook(void* g_pVguiLocalize, const char* path, const char* pathId, char unknown)
{
+ static bool bLoadModLocalisationFiles = true;
bool ret = AddLocalisationFile(g_pVguiLocalize, path, pathId, unknown);
if (ret)
spdlog::info("Loaded localisation file {} successfully", path);
- if (!loadModLocalisationFiles)
+ if (!bLoadModLocalisationFiles)
return ret;
- loadModLocalisationFiles = false;
+ bLoadModLocalisationFiles = false;
for (Mod mod : g_pModManager->m_loadedMods)
if (mod.Enabled)
for (std::string& localisationFile : mod.LocalisationFiles)
AddLocalisationFile(g_pVguiLocalize, localisationFile.c_str(), pathId, unknown);
- loadModLocalisationFiles = true;
+ bLoadModLocalisationFiles = true;
return ret;
}