diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-09-09 01:02:11 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-09-09 01:02:11 +0200 |
commit | 44a6e0230002ae8a55167453a3ff3283a59b1859 (patch) | |
tree | a6e4f8eff0f4b2f3723a9ae097d4f242a78fd278 /NorthstarDLL/playlist.cpp | |
parent | d2907aa522d56a4baacec1c17426f7d6f1fae3a2 (diff) | |
download | NorthstarLauncher-refactor-format-ignore-autohook.tar.gz NorthstarLauncher-refactor-format-ignore-autohook.zip |
Add clang-format ignores for AUTOHOOKrefactor-format-ignore-autohook
The proper solution would be to have some way in clang-format config
file that specifies that our `AUTOHOOK` formatting should be considered
correct but that takes more investigation and simply ignoring formatting
in AUTOHOOK macros is the lower hanging fruit.
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) |