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