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