Add vanilla compat for setplaylistvaroverride byte-patch (#847)

Co-authored-by: Rémy Raes <contact@remyraes.com>
This commit is contained in:
NachosChipeados 2025-05-18 07:32:10 -04:00 committed by GitHub
parent 8290f7b3c0
commit 8555f210ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,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
module.Offset(0x18ED17).NOP(6);
// 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);
}