From 5c7a3155653558d38c4bfb1445519b80f05bf184 Mon Sep 17 00:00:00 2001 From: Huoji's <1296564236@qq.com> Date: Sat, 14 Oct 2023 02:06:59 +0800 Subject: [PATCH] fix entitysystem get null after csgo update. --- csgo2/csgo2.vcxproj | 2 +- csgo2/hooks.cpp | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/csgo2/csgo2.vcxproj b/csgo2/csgo2.vcxproj index 96b205a..33fcf4c 100644 --- a/csgo2/csgo2.vcxproj +++ b/csgo2/csgo2.vcxproj @@ -154,7 +154,7 @@ pch.h stdcpplatest MultiThreaded - Disabled + MaxSpeed Windows diff --git a/csgo2/hooks.cpp b/csgo2/hooks.cpp index df09479..aca486b 100644 --- a/csgo2/hooks.cpp +++ b/csgo2/hooks.cpp @@ -79,14 +79,12 @@ void __fastcall hook_GameFrame(void* rcx, bool simulating, bool bFirstTick, global::m_flLastTickedTime = global::GlobalVars->curtime; global::HasTicked = true; - if (global::EntitySystem == nullptr) { - global::EntitySystem = CGameEntitySystem::GetInstance(); - } - GameTimer::ExcuteTimers(); GameTickRunTime::ExcuteTickFunctions(); } - + if (global::EntitySystem == nullptr) { + global::EntitySystem = CGameEntitySystem::GetInstance(); + } return origin_GameFrame(rcx, simulating, bFirstTick, bLastTick); } void __fastcall hook_StartServer(void* rcx,