From fb363f16204478758a5ff62290c2bae159d7507c Mon Sep 17 00:00:00 2001 From: RomeoCantCode Date: Tue, 8 Feb 2022 19:20:29 +0100 Subject: make playlist overrides work on private match By removing IsDedicated check it allows to use playlistvaroverrides on servers launched through the game (private match / listen server). It seems it does not have any other effect on the client so far. --- NorthstarDedicatedTest/playlist.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/NorthstarDedicatedTest/playlist.cpp b/NorthstarDedicatedTest/playlist.cpp index 7447f9f8..d885d6f0 100644 --- a/NorthstarDedicatedTest/playlist.cpp +++ b/NorthstarDedicatedTest/playlist.cpp @@ -101,16 +101,13 @@ void InitialisePlaylistHooks(HMODULE baseAddress) *((char*)ptr) = (char)0xC3; // jmp => ret } - if (IsDedicated()) - { - // patch to allow setplaylistvaroverride to be called before map init on dedicated - void* ptr = (char*)baseAddress + 0x18ED17; - TempReadWrite rw(ptr); - *((char*)ptr) = (char)0x90; - *((char*)ptr + 1) = (char)0x90; - *((char*)ptr + 2) = (char)0x90; - *((char*)ptr + 3) = (char)0x90; - *((char*)ptr + 4) = (char)0x90; - *((char*)ptr + 5) = (char)0x90; - } -} \ No newline at end of file + // patch to allow setplaylistvaroverride to be called before map init on dedicated and private match launched through the game + void* ptr = (char*)baseAddress + 0x18ED17; + TempReadWrite rw(ptr); + *((char*)ptr) = (char)0x90; + *((char*)ptr + 1) = (char)0x90; + *((char*)ptr + 2) = (char)0x90; + *((char*)ptr + 3) = (char)0x90; + *((char*)ptr + 4) = (char)0x90; + *((char*)ptr + 5) = (char)0x90; +} -- cgit v1.2.3