gamedata/sdktools.games/engine.ep2.txt
author Fyren <fyrenmoo@gmail.com>
Wed Jul 21 22:09:03 2010 -0500 (2010-07-21)
changeset 3089 5e3628933a4a
parent 3064 d6c24a31f411
child 3092 cb2d3738f854
permissions -rw-r--r--
FireOutput detour in SDKTools now uses CDetour (bug 4416, r=pred).
     1 /**
     2  * Do not edit this file.  Any changes will be overwritten by the gamedata
     3  * updater or by upgrading your SourceMod install.
     4  *
     5  * To override data in this file, create a subdirectory named "custom" and
     6  * place your own gamedata file(s) inside of it.  Such files will be parsed
     7  * after SM's own.
     8  *
     9  * For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(SourceMod)
    10  */
    11 
    12 "Games"
    13 {
    14 	/* General Temp Entities */
    15 	"#default"
    16 	{
    17 		"#supported"
    18 		{
    19 			"game"		"ageofchivalry"
    20 			"game"		"zps"
    21 			"game"		"empires"
    22 			"game"		"synergy"
    23 			"game"		"bg2"
    24 			"game"		"pvkii"
    25 			"game"		"gesource"
    26 		}
    27 
    28 		"Offsets"
    29 		{
    30 			/* Offset into CBaseTempEntity constructor */
    31 			"s_pTempEntities"
    32 			{
    33 				"windows"	"17"
    34 			}
    35 			"GetTEName"
    36 			{
    37 				"windows"	"4"
    38 				"linux"		"4"
    39 			}
    40 			"GetTENext"
    41 			{
    42 				"windows"	"8"
    43 				"linux"		"8"
    44 			}
    45 			"TE_GetServerClass"
    46 			{
    47 				"windows"	"0"
    48 				"linux"		"0"
    49 			}
    50 		}
    51 
    52 		"Signatures"
    53 		{
    54 			"CBaseTempEntity"
    55 			{
    56 				"library"	"server"
    57 				"windows"	"\x8B\xC1\x8B\x4C\x24\x04\xC7\x00\x2A\x2A\x2A\x2A\x89\x48\x04\x8B\x15\x2A\x2A\x2A\x2A\x89\x50\x08\xA3\x2A\x2A\x2A\x2A\xC2\x04\x00"
    58 			}
    59 			"s_pTempEntities"
    60 			{
    61 				"library"	"server"
    62 				"linux"		"@_ZN15CBaseTempEntity15s_pTempEntitiesE"
    63 			}
    64 		}
    65 	}
    66 	
    67 	/* Create Entity Signatures */
    68 	"#default"
    69 	{
    70 		"#supported"
    71 		{
    72 			"game"		"ageofchivalry"
    73 			"game"		"zps"
    74 			"game"		"pvkii"
    75 		}
    76 
    77 		"Signatures"
    78 		{
    79 			"DispatchSpawn"
    80 			{
    81 				"library"	"server"
    82 				"linux"		"@_Z13DispatchSpawnP11CBaseEntity"
    83 				"windows"	"\x53\x55\x56\x8B\x74\x24\x10\x85\xF6\x57\x0F\x84\x2A\x2A\x2A\x2A\x8B\x1D\x2A\x2A\x2A\x2A\x8B\x03\x8B\x50\x64\x8B\xCB"
    84 			}
    85 			"CreateEntityByName"
    86 			{
    87 				"library"	"server"
    88 				"linux"		"@_Z18CreateEntityByNamePKci"
    89 				"windows"	"\x56\x8B\x74\x24\x0C\x83\xFE\xFF\x57\x8B\x7C\x24\x0C\x74\x27\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01\x8B\x50\x54\x56\xFF\xD2"
    90 			}
    91 		}
    92 	}
    93 
    94 	/* CGlobalEntityList */
    95 	"#default"
    96 	{
    97 		"#supported"
    98 		{
    99 			"game"		"ageofchivalry"
   100 			"game"		"zps"
   101 			"game"		"pvkii"
   102 		}
   103 		
   104 		"Signatures"
   105 		{
   106 			/* Functions in CGlobalEntityList */
   107 			"FindEntityByClassname"
   108 			{
   109 				"library"	"server"
   110 				"windows"	"\x53\x55\x56\x8B\xF1\x8B\x4C\x24\x10\x85\xC9\x57\x74\x19\x8B\x01\x8B\x50\x08\xFF\xD2\x8B\x00\x25\xFF\x0F\x00\x00\x83\xC0\x01\xC1\xE0\x04\x8B\x3C\x30\xEB\x06\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x39\x8B\x5C\x24\x18\x8B\x2D\x2A\x2A\x2A\x2A\xEB\x03"
   111 				"linux"		"@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
   112 			}
   113 		}
   114 	}
   115 
   116 	/* General GameRules */
   117 	"#default"
   118 	{
   119 		"#supported"
   120 		{
   121 			"game"		"ageofchivalry"
   122 			"game"		"zps"
   123 			"game"		"empires"
   124 			"game"		"synergy"
   125 			"game"		"bg2"
   126 			"game"		"pvkii"
   127 			"game"		"gesource"
   128 			"game"		"RnLBeta"
   129 			"game"		"obsidian"
   130 		}
   131 		
   132 		"Offsets"
   133 		{
   134 			/* Offset into CreateGameRulesObject */
   135 			"g_pGameRules"
   136 			{
   137 				"windows"	"2"
   138 			}
   139 		}
   140 		
   141 		"Signatures"
   142 		{
   143 			/* This signature sometimes has multiple matches, but this
   144 			 * does not matter as g_pGameRules is involved in all of them.
   145 			 * The same g_pGameRules offset applies to each match.
   146 			 *
   147 			 * Sometimes this block of bytes is at the beginning of the static
   148 			 * CreateGameRulesObject function and sometimes it is in the middle
   149 			 * of an entirely different function. This depends on the game.
   150 			 */
   151 			"CreateGameRulesObject"
   152 			{
   153 				"library"	"server"
   154 				"windows"	"\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\x6A\x01\xFF\xD2"
   155 			}
   156 			"g_pGameRules"
   157 			{
   158 				"library"	"server"
   159 				"linux"		"@g_pGameRules"
   160 			}
   161 		}
   162 	}
   163 
   164 	/* IServer interface pointer */
   165 	"#default"
   166 	{
   167 		"Keys"
   168 		{
   169 			/* Signature for the beginning of IVEngineServer::CreateFakeClient.
   170 			 *
   171 			 * The engine binary is not actually scanned in order to look for
   172 			 * this. SourceHook is used to used to determine the address of the
   173 			 * function and this signature is used to verify that it contains
   174 			 * the expected code. A pointer to sv (IServer interface) is used
   175 			 * here.
   176 			 */
   177 			"CreateFakeClient_Windows"	"\x8B\x44\x24\x2A\x50\xB9\x2A\x2A\x2A\x2A\xE8"
   178 		}
   179 		
   180 		"Offsets"
   181 		{
   182 			/* Offset into IVEngineServer::CreateFakeClient */
   183 			"sv"
   184 			{
   185 				"windows"	"6"
   186 			}
   187 		}
   188 
   189 		"Signatures"
   190 		{
   191 			/* CBaseServer object for IServer interface */
   192 			"sv"
   193 			{
   194 				"library"	"engine"
   195 				"linux"		"@sv"
   196 			}
   197 		}
   198 	}
   199 	
   200 	/* EntityFactoryDictionary function */
   201 	"#default"
   202 	{
   203 		"Signatures"
   204 		{
   205 			"EntityFactory"
   206 			{
   207 				"library"	"server"
   208 				"windows"	"\xB8\x01\x00\x00\x00\x84\x2A\x2A\x2A\x2A\x2A\x75\x1D\x09\x2A\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x68\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x83\xC4\x04\xB8\x2A\x2A\x2A\x2A\xC3"
   209 				"linux"		"@_Z23EntityFactoryDictionaryv"
   210 			}
   211 		}
   212 	}
   213 
   214 	/* CBaseEntityOutput::FireOutput */
   215 	"#default"
   216 	{
   217 		"#supported"
   218 		{
   219 			"game"		"ageofchivalry"
   220 		}
   221 		"Signatures"
   222 		{
   223 			"FireOutput"
   224 			{
   225 				"library"	"server"
   226 				"windows"	"\x81\xEC\x1C\x01\x00\x00\x53\x55\x56\x8B\x71\x14\x85\xF6"
   227 				"linux"		"@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
   228 			}
   229 		}
   230 	}
   231 	
   232 	/* SetUserInfo data */
   233 	"#default"
   234 	{
   235 		"Offsets"
   236 		{
   237 			/**
   238 			 * CBaseClient::SetUserCVar(char  const*,char  const*);
   239 			 * Linux offset straight from VTable dump.
   240 			 * Windows offset is crazy. Found the windows SetName function using string "(%d)%-0.*s"
   241 			 * Cross referenced back to the vtable and counted manually (SetUserCvar is 1 higher, offsets start from 1)
   242 			 */
   243 			"SetUserCvar"
   244 			{
   245 				"windows"	"17"
   246 				"linux"		"55"
   247 			}
   248 			/**
   249 			 * Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made.
   250 			 * Find CBaseClient::UpdateUserSettings (strings "net_maxroutable", "cl_updaterate" etc) and the offset is set to 0 near the end.
   251 			 * Linux: 	mov     byte ptr [esi+98h], 0
   252 			 * Win:	mov     byte ptr [esi+0A4h], 0
   253 			 */
   254 			"InfoChanged"
   255 			{
   256 				"windows"	"140"
   257 				"linux"		"140"
   258 			}
   259 		}
   260 	}
   261 }