From 98d89695eb6732979bd9c1e6e50a510394346891 Mon Sep 17 00:00:00 2001 From: Tom Barham Date: Thu, 6 Jan 2022 14:26:37 +1000 Subject: don't hook language functions on dedicated server --- NorthstarDedicatedTest/languagehooks.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 #include @@ -104,6 +105,9 @@ char* GetGameLanguageHook() void InitialiseTier0LanguageHooks(HMODULE baseAddress) { + if (IsDedicated()) + return; + HookEnabler hook; ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0xF560, &GetGameLanguageHook, reinterpret_cast(&GetGameLanguageOriginal)); } \ No newline at end of file -- cgit v1.2.3