diff options
Diffstat (limited to 'NorthstarDLL/hoststate.cpp')
-rw-r--r-- | NorthstarDLL/hoststate.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/NorthstarDLL/hoststate.cpp b/NorthstarDLL/hoststate.cpp index 875d671d..adbcde3b 100644 --- a/NorthstarDLL/hoststate.cpp +++ b/NorthstarDLL/hoststate.cpp @@ -6,6 +6,7 @@ #include "playlist.h" #include "tier0.h" #include "r2engine.h" +#include "limits.h" AUTOHOOK_INIT() @@ -27,8 +28,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)) +void, __fastcall, (CHostState* self)) +// clang-format on { spdlog::info("HostState: NewGame"); @@ -58,8 +61,10 @@ void,, (CHostState* self)) g_pServerAuthentication->m_bNeedLocalAuthForNewgame = false; } +// clang-format off AUTOHOOK(CHostState__State_ChangeLevelMP, engine.dll + 0x16E520, -void,, (CHostState* self)) +void, __fastcall, (CHostState* self)) +// clang-format on { spdlog::info("HostState: ChangeLevelMP"); @@ -72,8 +77,10 @@ void,, (CHostState* self)) g_pServerPresence->SetMap(g_pHostState->m_levelName); } +// clang-format off AUTOHOOK(CHostState__State_GameShutdown, engine.dll + 0x16E640, -void,, (CHostState* self)) +void, __fastcall, (CHostState* self)) +// clang-format on { spdlog::info("HostState: GameShutdown"); @@ -83,8 +90,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); @@ -92,6 +101,9 @@ void, __fastcall, (CHostState* self, double flCurrentTime, float flFrameTime)) { // update server presence g_pServerPresence->RunFrame(flCurrentTime); + + // update limits for frame + g_pServerLimits->RunFrame(flCurrentTime, flFrameTime); } } |