Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add vanilla compatibility for setplaylistvar byte-patch #687

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion primedev/shared/playlist.cpp
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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
VITALISED marked this conversation as resolved.
Show resolved Hide resolved
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())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would rather this byte patch was replaced with a function hook, so that in the case where vanilla compatibility becomes toggleable at runtime this will behave properly.

module.Offset(0x18ED17).NOP(6);
}
Loading