gamedata/sdktools.games/engine.ep2.txt
author Fyren <fyrenmoo@gmail.com>
Tue Apr 07 09:59:21 2009 -0700 (2009-04-07)
changeset 2690 e3906d051a3b
parent 2599 e639923af7dd
child 2746 8d68569b9648
permissions -rw-r--r--
Add a warning to not edit SM's gamedata files; switched to UNIX line endings (bug 3728, r=dvander)
     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"		"dod"
    20 			"game"		"tf"
    21 			"game"		"ageofchivalry"
    22 			"game"		"ZPS"
    23 		}
    24 
    25 		"Offsets"
    26 		{
    27 			/* Offset into CBaseTempEntity constructor */
    28 			"s_pTempEntities"
    29 			{
    30 				"windows"	"17"
    31 			}
    32 			"GetTEName"
    33 			{
    34 				"windows"	"4"
    35 				"linux"		"4"
    36 			}
    37 			"GetTENext"
    38 			{
    39 				"windows"	"8"
    40 				"linux"		"8"
    41 			}
    42 			"TE_GetServerClass"
    43 			{
    44 				"windows"	"0"
    45 				"linux"		"0"
    46 			}
    47 		}
    48 
    49 		"Signatures"
    50 		{
    51 			"CBaseTempEntity"
    52 			{
    53 				"library"	"server"
    54 				"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"
    55 			}
    56 			"s_pTempEntities"
    57 			{
    58 				"library"	"server"
    59 				"linux"		"@_ZN15CBaseTempEntity15s_pTempEntitiesE"
    60 			}
    61 		}
    62 	}
    63 	
    64 	/* Create Entity Signatures */
    65 	"#default"
    66 	{
    67 		"#supported"
    68 		{
    69 			"game"		"dod"
    70 			"game"		"tf"
    71 			"game"		"ageofchivalry"
    72 			"game"		"ZPS"
    73 		}
    74 
    75 		"Signatures"
    76 		{
    77 			"DispatchSpawn"
    78 			{
    79 				"library"	"server"
    80 				"linux"		"@_Z13DispatchSpawnP11CBaseEntity"
    81 				"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"
    82 			}
    83 			"CreateEntityByName"
    84 			{
    85 				"library"	"server"
    86 				"linux"		"@_Z18CreateEntityByNamePKci"
    87 				"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"
    88 			}
    89 		}
    90 	}
    91 
    92 	/* CGlobalEntityList */
    93 	"#default"
    94 	{
    95 		"#supported"
    96 		{
    97 			"game"		"dod"
    98 			"game"		"tf"
    99 			"game"		"ageofchivalry"
   100 			"game"		"ZPS"
   101 		}
   102 		
   103 		"Offsets"
   104 		{
   105 			/* Offset into LevelShutdown */
   106 			"gEntList"
   107 			{
   108 				"windows"	"11"
   109 			}
   110 		}
   111 		
   112 		"Signatures"
   113 		{
   114 			"LevelShutdown"
   115 			{
   116 				"library"	"server"
   117 				"windows"	"\xE8\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xE8"
   118 			}
   119 			"gEntList"
   120 			{
   121 				"library"	"server"
   122 				"linux"		"@gEntList"
   123 			}
   124 			
   125 			/* Functions in CGlobalEntityList */
   126 			"FindEntityByClassname"
   127 			{
   128 				"library"	"server"
   129 				"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"
   130 				"linux"		"@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
   131 			}
   132 		}
   133 	}
   134 
   135 	/* General GameRules */
   136 	"#default"
   137 	{
   138 		"#supported"
   139 		{
   140 			"game"		"dod"
   141 			"game"		"tf"
   142 			"game"		"ageofchivalry"
   143 			"game"		"ZPS"
   144 		}
   145 		
   146 		"Offsets"
   147 		{
   148 			/* Offset into CreateGameRulesObject */
   149 			"g_pGameRules"
   150 			{
   151 				"windows"	"2"
   152 			}
   153 		}
   154 		
   155 		"Signatures"
   156 		{
   157 			/* This signature sometimes has multiple matches, but this
   158 			 * does not matter as g_pGameRules is involved in all of them.
   159 			 * The same g_pGameRules offset applies to each match.
   160 			 *
   161 			 * Sometimes this block of bytes is at the beginning of the static
   162 			 * CreateGameRulesObject function and sometimes it is in the middle
   163 			 * of an entirely different function. This depends on the game.
   164 			 */
   165 			"CreateGameRulesObject"
   166 			{
   167 				"library"	"server"
   168 				"windows"	"\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\x6A\x01\xFF\xD2"
   169 			}
   170 			"g_pGameRules"
   171 			{
   172 				"library"	"server"
   173 				"linux"		"@g_pGameRules"
   174 			}
   175 		}
   176 	}
   177 
   178 	/* IServer interface pointer */
   179 	"#default"
   180 	{
   181 		"Keys"
   182 		{
   183 			/* Signature for the beginning of IVEngineServer::CreateFakeClient.
   184 			 *
   185 			 * The engine binary is not actually scanned in order to look for
   186 			 * this. SourceHook is used to used to determine the address of the
   187 			 * function and this signature is used to verify that it contains
   188 			 * the expected code. A pointer to sv (IServer interface) is used
   189 			 * here.
   190 			 */
   191 			"CreateFakeClient_Windows"	"\x8B\x44\x24\x2A\x50\xB9\x2A\x2A\x2A\x2A\xE8"
   192 		}
   193 		
   194 		"Offsets"
   195 		{
   196 			/* Offset into IVEngineServer::CreateFakeClient */
   197 			"sv"
   198 			{
   199 				"windows"	"6"
   200 			}
   201 		}
   202 
   203 		"Signatures"
   204 		{
   205 			/* CBaseServer object for IServer interface */
   206 			"sv"
   207 			{
   208 				"library"	"engine"
   209 				"linux"		"@sv"
   210 			}
   211 		}
   212 	}
   213 	
   214 	/* EntityFactoryDictionary function */
   215 	"#default"
   216 	{
   217 		"Signatures"
   218 		{
   219 			"EntityFactory"
   220 			{
   221 				"library"	"server"
   222 				"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"
   223 				"linux"		"@_Z23EntityFactoryDictionaryv"
   224 			}
   225 		}
   226 	}
   227 
   228 	/* CBaseEntityOutput::FireOutput */
   229 	"#default"
   230 	{
   231 		"#supported"
   232 		{
   233 			"game"		"dod"
   234 			"game"		"tf"
   235 			"game"		"ageofchivalry"
   236 		}
   237 		"Signatures"
   238 		{
   239 			"FireOutput"
   240 			{
   241 				"library"	"server"
   242 				"windows"	"\x81\xEC\x1C\x01\x00\x00\x53\x55\x56\x8B\x71\x14\x85\xF6"
   243 				"linux"		"@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
   244 			}
   245 		}
   246 		"Offsets"
   247 		{
   248 			"FireOutputBackup"
   249 			{
   250 				"windows"	"6"
   251 				"linux"		"10"
   252 			}
   253 		}
   254 	}
   255 	
   256 	/* SetUserInfo data */
   257 	"#default"
   258 	{
   259 		"Offsets"
   260 		{
   261 			/**
   262 			 * CBaseClient::SetUserCVar(char  const*,char  const*);
   263 			 * Linux offset straight from VTable dump.
   264 			 * Windows offset is crazy. Found the windows 'SetName' function using string "(%d)%-0.*s"
   265 			 * Cross referenced back to the vtable and counted manually (SetUserCvar is 1 higher, offsets start from 1)
   266 			 */
   267 			"SetUserCvar"
   268 			{
   269 				"windows"	"17"
   270 				"linux"		"55"
   271 			}
   272 			/**
   273 			 * Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made.
   274 			 * Find CBaseClient::UpdateUserSettings (strings "net_maxroutable", "cl_updaterate" etc) and the offset is set to 0 near the end.
   275 			 * Linux: 	mov     byte ptr [esi+98h], 0
   276 			 * Win:	mov     byte ptr [esi+0A4h], 0
   277 			 */
   278 			"InfoChanged"
   279 			{
   280 				"windows"	"140"
   281 				"linux"		"140"
   282 			}
   283 		}
   284 	}
   285 }