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