diff --git a/extensions/sdktools/vglobals.cpp b/extensions/sdktools/vglobals.cpp index aeaf3bff..54b533bd 100644 --- a/extensions/sdktools/vglobals.cpp +++ b/extensions/sdktools/vglobals.cpp @@ -130,9 +130,19 @@ bool UTIL_VerifySignature(const void *addr, const char *sig, size_t len) void GetIServer() { -#if SOURCE_ENGINE == SE_TF2 - iserver = engine->GetIServer(); -#else +#if SOURCE_ENGINE == SE_TF2 \ + || SOURCE_ENGINE == SE_DODS \ + || SOURCE_ENGINE == SE_HL2DM \ + || SOURCE_ENGINE == SE_CSS \ + || SOURCE_ENGINE == SE_SDK2013 + + if (g_SMAPI->GetEngineFactory(false)("VEngineServer022", nullptr)) + { + iserver = engine->GetIServer(); + return; + } +#endif + void *addr; const char *sigstr; char sig[32]; @@ -191,7 +201,6 @@ void GetIServer() /* Finally we have the interface we were looking for */ iserver = *reinterpret_cast(reinterpret_cast(vfunc) + offset); -#endif // !TF2 } void GetResourceEntity()