Updated SDKTools IServer finding on Windows for Ep2v and CSS (bug 5450, r=me).

This commit is contained in:
Nicholas Hastings
2012-08-23 07:47:44 -04:00
parent 805306bdf0
commit d88f07fd31
3 changed files with 14 additions and 6 deletions
+8
View File
@@ -127,14 +127,22 @@ void GetIServer()
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
/* Get the CreateFakeClient function pointer */
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
if (!(vfunc=SH_GET_ORIG_VFNPTR_ENTRY(engine, &IVEngineServer::CreateFakeClientEx)))
#else
if (!(vfunc=SH_GET_ORIG_VFNPTR_ENTRY(engine, &IVEngineServer::CreateFakeClient)))
#endif
{
return;
}
#else
/* Get the interface manually */
SourceHook::MemFuncInfo info = {true, -1, 0, 0};
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
SourceHook::GetFuncInfo(&IVEngineServer::CreateFakeClientEx, info);
#else
SourceHook::GetFuncInfo(&IVEngineServer::CreateFakeClient, info);
#endif
vfunc = enginePatch->GetOrigFunc(info.vtbloffs, info.vtblindex);
if (!vfunc)