Skip to content

Commit

Permalink
fix: CM flag initialization happening on every tick outside CM. (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
kot9pa16lvl authored Aug 15, 2024
1 parent ca8bac3 commit 070f753
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Modules/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -673,12 +673,13 @@ static void InitPlayerRunCommandHook() {
}

// CServerGameDLL::GameFrame
DETOUR(Server::GameFrame, bool simulating)
{
ON_EVENT(SESSION_START) {
if (!IsAcceptInputTrampolineInitialized) InitAcceptInputTrampoline();
if (!g_IsCMFlagHookInitialized) InitCMFlagHook();
if ((!g_IsCMFlagHookInitialized) && (sv_bonus_challenge.GetBool())) InitCMFlagHook();
if (!g_IsPlayerRunCommandHookInitialized) InitPlayerRunCommandHook();

}
DETOUR(Server::GameFrame, bool simulating)
{
if (sar_tick_debug.GetInt() >= 3 || (sar_tick_debug.GetInt() >= 2 && simulating)) {
int host, server, client;
engine->GetTicks(host, server, client);
Expand Down

0 comments on commit 070f753

Please sign in to comment.