diff --git a/src/core/globals.cpp b/src/core/globals.cpp index fd366a0a..bd0cecff 100644 --- a/src/core/globals.cpp +++ b/src/core/globals.cpp @@ -141,7 +141,10 @@ void DetourGameEventManagerInit(IGameEventManager2* pGameEventManager) } int source_hook_pluginid = 0; -CGlobalVars* getGlobalVars() { return engineServer2->GetServerGlobals(); } - +CGlobalVars* getGlobalVars() { + INetworkGameServer *server = networkServerService->GetIGameServer(); + if(!server) return nullptr; + return networkServerService->GetIGameServer()->GetGlobals(); +} } // namespace globals } // namespace counterstrikesharp