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