aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/languagehooks.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-01-07 00:00:49 +0000
committerGitHub <noreply@github.com>2022-01-07 00:00:49 +0000
commitf3f4a11cd26c737efad49e318ca7d1ef942d42c4 (patch)
tree07853f1a42094aa76d5274aafb2213a66a9908c3 /NorthstarDedicatedTest/languagehooks.cpp
parentca6d9978ed243243b0b902b2342190d705aa2598 (diff)
parent98d89695eb6732979bd9c1e6e50a510394346891 (diff)
downloadNorthstarLauncher-f3f4a11cd26c737efad49e318ca7d1ef942d42c4.tar.gz
NorthstarLauncher-f3f4a11cd26c737efad49e318ca7d1ef942d42c4.zip
Merge pull request #40 from cpdt/fix-language-hook
Don't hook language functions on dedicated server
Diffstat (limited to 'NorthstarDedicatedTest/languagehooks.cpp')
-rw-r--r--NorthstarDedicatedTest/languagehooks.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/languagehooks.cpp b/NorthstarDedicatedTest/languagehooks.cpp
index 08bacaf9..0929b73d 100644
--- a/NorthstarDedicatedTest/languagehooks.cpp
+++ b/NorthstarDedicatedTest/languagehooks.cpp
@@ -1,6 +1,7 @@
#include "pch.h"
#include "languagehooks.h"
#include "gameutils.h"
+#include "dedicated.h"
#include <filesystem>
#include <regex>
@@ -104,6 +105,9 @@ char* GetGameLanguageHook()
void InitialiseTier0LanguageHooks(HMODULE baseAddress)
{
+ if (IsDedicated())
+ return;
+
HookEnabler hook;
ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0xF560, &GetGameLanguageHook, reinterpret_cast<LPVOID*>(&GetGameLanguageOriginal));
} \ No newline at end of file