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