From b19cd5abd6079ebe46b0dead73f5591fb0ec00dd Mon Sep 17 00:00:00 2001 From: Will <39478251+VITALISED@users.noreply.github.com> Date: Sat, 6 Apr 2024 23:42:46 +1100 Subject: [PATCH 1/3] Add vanilla compat for setplaylistvaroverride byte-patch --- primedev/shared/playlist.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/primedev/shared/playlist.cpp b/primedev/shared/playlist.cpp index 2b9ad9798..1ac5b9323 100644 --- a/primedev/shared/playlist.cpp +++ b/primedev/shared/playlist.cpp @@ -1,6 +1,7 @@ #include "playlist.h" #include "core/convar/concommand.h" #include "core/convar/convar.h" +#include "core/vanilla.h" #include "squirrel/squirrel.h" #include "engine/hoststate.h" #include "engine/r2engine.h" @@ -121,5 +122,6 @@ ON_DLL_LOAD_RELIESON("engine.dll", PlaylistHooks, (ConCommand, ConVar), (CModule module.Offset(0x18ED8D).Patch("C3"); // patch to allow setplaylistvaroverride to be called before map init on dedicated and private match launched through the game - module.Offset(0x18ED17).NOP(6); + if(!g_pVanillaCompatibility->GetVanillaCompatibility()) + module.Offset(0x18ED17).NOP(6); } From 83431ca02f837f851f72d015514d41cd053b5555 Mon Sep 17 00:00:00 2001 From: Will <39478251+VITALISED@users.noreply.github.com> Date: Sat, 6 Apr 2024 23:47:09 +1100 Subject: [PATCH 2/3] Fix formatting --- primedev/shared/playlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primedev/shared/playlist.cpp b/primedev/shared/playlist.cpp index 1ac5b9323..466a0027c 100644 --- a/primedev/shared/playlist.cpp +++ b/primedev/shared/playlist.cpp @@ -122,6 +122,6 @@ ON_DLL_LOAD_RELIESON("engine.dll", PlaylistHooks, (ConCommand, ConVar), (CModule module.Offset(0x18ED8D).Patch("C3"); // patch to allow setplaylistvaroverride to be called before map init on dedicated and private match launched through the game - if(!g_pVanillaCompatibility->GetVanillaCompatibility()) + if (!g_pVanillaCompatibility->GetVanillaCompatibility()) module.Offset(0x18ED17).NOP(6); } From 16b19afb15a59cbb6761959ef01a72861126af64 Mon Sep 17 00:00:00 2001 From: Will <39478251+VITALISED@users.noreply.github.com> Date: Mon, 8 Apr 2024 23:54:23 +1000 Subject: [PATCH 3/3] Update primedev/shared/playlist.cpp Co-authored-by: Cyn <70904206+itscynxx@users.noreply.github.com> --- primedev/shared/playlist.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/primedev/shared/playlist.cpp b/primedev/shared/playlist.cpp index 466a0027c..619e6eca1 100644 --- a/primedev/shared/playlist.cpp +++ b/primedev/shared/playlist.cpp @@ -122,6 +122,7 @@ ON_DLL_LOAD_RELIESON("engine.dll", PlaylistHooks, (ConCommand, ConVar), (CModule module.Offset(0x18ED8D).Patch("C3"); // patch to allow setplaylistvaroverride to be called before map init on dedicated and private match launched through the game + // only run on non-vanilla as this patch makes users unable to change private match settings on vanilla if (!g_pVanillaCompatibility->GetVanillaCompatibility()) module.Offset(0x18ED17).NOP(6); }