diff --git a/modules/cstrike/cstrike/CstrikeHacks.cpp b/modules/cstrike/cstrike/CstrikeHacks.cpp index f81f804c..8c004eb3 100644 --- a/modules/cstrike/cstrike/CstrikeHacks.cpp +++ b/modules/cstrike/cstrike/CstrikeHacks.cpp @@ -524,22 +524,28 @@ void InitGlobalVars() uintptr_t base = *reinterpret_cast(reinterpret_cast(g_engfuncs.pfnGetCurrentPlayer) + typeDesc.fieldOffset); ServerStatic = reinterpret_cast(base - 4); } + + if (CommonConfig->GetAddress("sv", &address)) + { + Server = *reinterpret_cast(address); + } #else if (CommonConfig->GetMemSig("svs", &address)) { ServerStatic = reinterpret_cast(address); } -#endif - if (CommonConfig->GetAddress("sv", &address)) + + if (CommonConfig->GetMemSig("sv", &address)) { - Server = *reinterpret_cast(address); + Server = reinterpret_cast(address); } +#endif if (!ServerStatic) { MF_Log("svs global variable is not available\n"); } - + if (!Server) { MF_Log("sv global variable is not available\n");