Updated SDKTools IServer finding on Windows for Ep2v and CSS (bug 5450, r=me).
authorNicholas Hastings <skamonkey@gmail.com>
Thu Aug 23 07:47:44 2012 -0400 (2012-08-23)
changeset 3625cde554b8c957
parent 3624 e21a7f57282a
child 3626 44eb47dcee63
Updated SDKTools IServer finding on Windows for Ep2v and CSS (bug 5450, r=me).
extensions/sdktools/vglobals.cpp
gamedata/sdktools.games/engine.css.txt
gamedata/sdktools.games/engine.ep2valve.txt
     1.1 --- a/extensions/sdktools/vglobals.cpp	Wed Aug 22 21:50:01 2012 -0400
     1.2 +++ b/extensions/sdktools/vglobals.cpp	Thu Aug 23 07:47:44 2012 -0400
     1.3 @@ -127,14 +127,22 @@
     1.4  
     1.5  #if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
     1.6  	/* Get the CreateFakeClient function pointer */
     1.7 +#if SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
     1.8 +	if (!(vfunc=SH_GET_ORIG_VFNPTR_ENTRY(engine, &IVEngineServer::CreateFakeClientEx)))
     1.9 +#else
    1.10  	if (!(vfunc=SH_GET_ORIG_VFNPTR_ENTRY(engine, &IVEngineServer::CreateFakeClient)))
    1.11 +#endif
    1.12  	{
    1.13  		return;
    1.14  	}
    1.15  #else
    1.16  	/* Get the interface manually */
    1.17  	SourceHook::MemFuncInfo info = {true, -1, 0, 0};
    1.18 +#if SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
    1.19 +	SourceHook::GetFuncInfo(&IVEngineServer::CreateFakeClientEx, info);
    1.20 +#else
    1.21  	SourceHook::GetFuncInfo(&IVEngineServer::CreateFakeClient, info);
    1.22 +#endif
    1.23  
    1.24  	vfunc = enginePatch->GetOrigFunc(info.vtbloffs, info.vtblindex);
    1.25  	if (!vfunc)
     2.1 --- a/gamedata/sdktools.games/engine.css.txt	Wed Aug 22 21:50:01 2012 -0400
     2.2 +++ b/gamedata/sdktools.games/engine.css.txt	Thu Aug 23 07:47:44 2012 -0400
     2.3 @@ -114,7 +114,7 @@
     2.4  	{
     2.5  		"Keys"
     2.6  		{
     2.7 -			/* Signature for the beginning of IVEngineServer::CreateFakeClient.
     2.8 +			/* Signature for the beginning of IVEngineServer::CreateFakeClientEx.
     2.9  			 *
    2.10  			 * The engine binary is not actually scanned in order to look for
    2.11  			 * this. SourceHook is used to used to determine the address of the
    2.12 @@ -122,7 +122,7 @@
    2.13  			 * the expected code. A pointer to sv (IServer interface) is used
    2.14  			 * here.
    2.15  			 */
    2.16 -			"CreateFakeClient_Windows"	"\x55\x8B\xEC\x8B\x45\x2A\x50\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x85\xC0"
    2.17 +			"CreateFakeClient_Windows"	"\x55\x8B\xEC\x8B\x2A\x2A\x8A\x2A\x2A\x51\xB9\x2A\x2A\x2A\x2A\xA2"
    2.18  		}
    2.19  		
    2.20  		"Offsets"
    2.21 @@ -130,7 +130,7 @@
    2.22  			/* Offset into IVEngineServer::CreateFakeClient */
    2.23  			"sv"
    2.24  			{
    2.25 -				"windows"	"8"
    2.26 +				"windows"	"11"
    2.27  			}
    2.28  		}
    2.29  
     3.1 --- a/gamedata/sdktools.games/engine.ep2valve.txt	Wed Aug 22 21:50:01 2012 -0400
     3.2 +++ b/gamedata/sdktools.games/engine.ep2valve.txt	Thu Aug 23 07:47:44 2012 -0400
     3.3 @@ -138,7 +138,7 @@
     3.4  	{
     3.5  		"Keys"
     3.6  		{
     3.7 -			/* Signature for the beginning of IVEngineServer::CreateFakeClient.
     3.8 +			/* Signature for the beginning of IVEngineServer::CreateFakeClientEx.
     3.9  			 *
    3.10  			 * The engine binary is not actually scanned in order to look for
    3.11  			 * this. SourceHook is used to used to determine the address of the
    3.12 @@ -146,7 +146,7 @@
    3.13  			 * the expected code. A pointer to sv (IServer interface) is used
    3.14  			 * here.
    3.15  			 */
    3.16 -			"CreateFakeClient_Windows"	"\x55\x8B\xEC\x8B\x45\x2A\x50\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x85\xC0"
    3.17 +			"CreateFakeClient_Windows"	"\x55\x8B\xEC\x8B\x2A\x2A\x8A\x2A\x2A\x51\xB9\x2A\x2A\x2A\x2A\xA2"
    3.18  		}
    3.19  		
    3.20  		"Offsets"
    3.21 @@ -154,7 +154,7 @@
    3.22  			/* Offset into IVEngineServer::CreateFakeClient */
    3.23  			"sv"
    3.24  			{
    3.25 -				"windows"	"8"
    3.26 +				"windows"	"11"
    3.27  			}
    3.28  		}
    3.29