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