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

Conversation

VITALISED
Copy link

This PR fixes #623 by adding a vanilla compatibility check for some NOPs in playlist.cpp

@r3muxd
Copy link

r3muxd commented Apr 7, 2024

+1 lgtm

Copy link
Contributor

@itscynxx itscynxx left a comment

Choose a reason for hiding this comment

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

This pr works as intended, and solves the issue I've been trying to with Northstar (where vanilla private match settings wont apply).

No idea if it introduces any kind of security concern, someone else can confirm (e.g. does this allow vanilla users to change these variables when they aren't meant to be able to via console)

However, in contrary to your other prs this one does only work if vanilla and northstar are split. I am personally all for them being split still, but it's something to consider if you really wish to make them compatible

I just think the comment should be changed to describe what's happening better

primedev/shared/playlist.cpp Show resolved Hide resolved
@GeckoEidechse
Copy link
Member

However, in contrary to your other prs this one does only work if vanilla and northstar are split.

I'm confused, you mean this (somehow) breaks behaviour in Northstar?

@@ -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())
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.

@VITALISED VITALISED closed this Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Private game settings don't apply (vanilla)
5 participants