From 44a6e0230002ae8a55167453a3ff3283a59b1859 Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Fri, 9 Sep 2022 01:02:11 +0200 Subject: Add clang-format ignores for 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. --- NorthstarDLL/hoststate.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'NorthstarDLL/hoststate.cpp') diff --git a/NorthstarDLL/hoststate.cpp b/NorthstarDLL/hoststate.cpp index 875d671d..055973ac 100644 --- a/NorthstarDLL/hoststate.cpp +++ b/NorthstarDLL/hoststate.cpp @@ -27,8 +27,10 @@ void ServerStartingOrChangingMap() g_pCVar->FindVar("net_data_block_enabled")->SetValue(true); } +// clang-format off AUTOHOOK(CHostState__State_NewGame, engine.dll + 0x16E7D0, void,, (CHostState* self)) +// clang-format on { spdlog::info("HostState: NewGame"); @@ -58,8 +60,10 @@ void,, (CHostState* self)) g_pServerAuthentication->m_bNeedLocalAuthForNewgame = false; } +// clang-format off AUTOHOOK(CHostState__State_ChangeLevelMP, engine.dll + 0x16E520, void,, (CHostState* self)) +// clang-format on { spdlog::info("HostState: ChangeLevelMP"); @@ -72,8 +76,10 @@ void,, (CHostState* self)) g_pServerPresence->SetMap(g_pHostState->m_levelName); } +// clang-format off AUTOHOOK(CHostState__State_GameShutdown, engine.dll + 0x16E640, void,, (CHostState* self)) +// clang-format on { spdlog::info("HostState: GameShutdown"); @@ -83,8 +89,10 @@ void,, (CHostState* self)) CHostState__State_GameShutdown(self); } +// clang-format off AUTOHOOK(CHostState__FrameUpdate, engine.dll + 0x16DB00, void, __fastcall, (CHostState* self, double flCurrentTime, float flFrameTime)) +// clang-format on { CHostState__FrameUpdate(self, flCurrentTime, flFrameTime); -- cgit v1.2.3