Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
fix entitysystem get null after csgo update.
Browse files Browse the repository at this point in the history
  • Loading branch information
huoji120 committed Oct 13, 2023
1 parent 79bc2cf commit 5c7a315
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion csgo2/csgo2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpplatest</LanguageStandard>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<Optimization>Disabled</Optimization>
<Optimization>MaxSpeed</Optimization>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
8 changes: 3 additions & 5 deletions csgo2/hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5c7a315

Please sign in to comment.