diff options
Diffstat (limited to 'NorthstarDLL/playlist.cpp')
-rw-r--r-- | NorthstarDLL/playlist.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/NorthstarDLL/playlist.cpp b/NorthstarDLL/playlist.cpp index 7cf9e41e..5b70c63e 100644 --- a/NorthstarDLL/playlist.cpp +++ b/NorthstarDLL/playlist.cpp @@ -19,8 +19,10 @@ namespace R2 ConVar* Cvar_ns_use_clc_SetPlaylistVarOverride; +// clang-format off AUTOHOOK(clc_SetPlaylistVarOverride__Process, engine.dll + 0x222180, char,, (void* a1, void* a2)) +// clang-format on { // the private_match playlist on mp_lobby is the only situation where there should be any legitimate sending of this netmessage if (!Cvar_ns_use_clc_SetPlaylistVarOverride->GetBool() || strcmp(R2::GetCurrentPlaylistName(), "private_match") || strcmp(R2::g_pHostState->m_levelName, "mp_lobby")) @@ -29,8 +31,10 @@ char,, (void* a1, void* a2)) return clc_SetPlaylistVarOverride__Process(a1, a2); } +// clang-format off AUTOHOOK(SetCurrentPlaylist, engine.dll + 0x18EB20, bool, __fastcall, (const char* pPlaylistName)) +// clang-format on { bool bSuccess = SetCurrentPlaylist(pPlaylistName); @@ -43,8 +47,10 @@ bool, __fastcall, (const char* pPlaylistName)) return bSuccess; } +// clang-format off AUTOHOOK(SetPlaylistVarOverride, engine.dll + 0x18ED00, void,, (const char* pVarName, const char* pValue)) +// clang-format on { if (strlen(pValue) >= 64) return; @@ -52,8 +58,10 @@ void,, (const char* pVarName, const char* pValue)) SetPlaylistVarOverride(pVarName, pValue); } +// clang-format off AUTOHOOK(GetCurrentPlaylistVar, engine.dll + 0x18C680, const char*,, (const char* pVarName, bool bUseOverrides)) +// clang-format on { if (!bUseOverrides && !strcmp(pVarName, "max_players")) bUseOverrides = true; @@ -61,8 +69,10 @@ const char*,, (const char* pVarName, bool bUseOverrides)) return GetCurrentPlaylistVar(pVarName, bUseOverrides); } +// clang-format off AUTOHOOK(GetCurrentGamemodeMaxPlayers, engine.dll + 0x18C430, int,, ()) +// clang-format on { const char* pMaxPlayers = R2::GetCurrentPlaylistVar("max_players", 0); if (!pMaxPlayers) |