From 8b6cf6a48586317e5629bddf5a32dc84b2663d63 Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Sat, 25 Dec 2021 02:58:57 +0000 Subject: fix setplaylistvaroverride bug --- NorthstarDedicatedTest/gameutils.cpp | 2 +- NorthstarDedicatedTest/playlist.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'NorthstarDedicatedTest') diff --git a/NorthstarDedicatedTest/gameutils.cpp b/NorthstarDedicatedTest/gameutils.cpp index 32947ac6..642c44e6 100644 --- a/NorthstarDedicatedTest/gameutils.cpp +++ b/NorthstarDedicatedTest/gameutils.cpp @@ -59,7 +59,7 @@ void InitialiseEngineGameUtilFunctions(HMODULE baseAddress) GetCurrentPlaylistName = (GetCurrentPlaylistType)((char*)baseAddress + 0x18C640); SetCurrentPlaylist = (SetCurrentPlaylistType)((char*)baseAddress + 0x18EB20); - SetPlaylistVarOverride = (SetPlaylistVarOverrideType)((char*)baseAddress + 0x18ED17); + SetPlaylistVarOverride = (SetPlaylistVarOverrideType)((char*)baseAddress + 0x18ED00); GetCurrentPlaylistVar = (GetCurrentPlaylistVarType)((char*)baseAddress + 0x18C680); g_LocalPlayerUserID = (char*)baseAddress + 0x13F8E688; diff --git a/NorthstarDedicatedTest/playlist.cpp b/NorthstarDedicatedTest/playlist.cpp index 3de5b8c8..b853a40a 100644 --- a/NorthstarDedicatedTest/playlist.cpp +++ b/NorthstarDedicatedTest/playlist.cpp @@ -49,7 +49,7 @@ void InitialisePlaylistHooks(HMODULE baseAddress) HookEnabler hook; ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x222180, &Onclc_SetPlaylistVarOverrideHook, reinterpret_cast(&Onclc_SetPlaylistVarOverride)); - ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x18ED17, &SetPlaylistVarOverrideHook, reinterpret_cast(&SetPlaylistVarOverrideOriginal)); + ENABLER_CREATEHOOK(hook, (char*)baseAddress + 0x18ED00, &SetPlaylistVarOverrideHook, reinterpret_cast(&SetPlaylistVarOverrideOriginal)); // patch to prevent clc_SetPlaylistVarOverride from being able to crash servers if we reach max overrides due to a call to Error (why is this possible respawn, wtf) // todo: add a warning for this -- cgit v1.2.3