aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/languagehooks.cpp
diff options
context:
space:
mode:
authorTom Barham <me@cpdt.dev>2022-01-06 14:26:37 +1000
committerTom Barham <me@cpdt.dev>2022-01-06 14:26:37 +1000
commit98d89695eb6732979bd9c1e6e50a510394346891 (patch)
tree45d82c48fa4029a65ba509da0682009908dab523 /NorthstarDedicatedTest/languagehooks.cpp
parent733bf92983fa60abfaad6af5c0b9950c3d1e3a4e (diff)
downloadNorthstarLauncher-98d89695eb6732979bd9c1e6e50a510394346891.tar.gz
NorthstarLauncher-98d89695eb6732979bd9c1e6e50a510394346891.zip
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