gamedata/sdktools.games.ep2.txt
author Matt Woodrow <pred@alliedmods.net>
Sun Jul 06 03:30:06 2008 +0000 (2008-07-06)
changeset 2165 ca3757e676f6
parent 2148 4202fd210f20
child 2167 e94c33b3ceb4
permissions -rw-r--r--
Fixed requiring dependencies at the wrong time.
     1 "Games"
     2 {
     3 	/* Sounds */
     4 	"#default"
     5 	{
     6 		"Keys"
     7 		{
     8 			"SlapSoundCount"	"3"
     9 			"SlapSound1"		"player/pl_fallpain1.wav"
    10 			"SlapSound2"		"player/pl_fallpain3.wav"
    11 			"SlapSound3"		"player/pl_pain5.wav"
    12 			"m_iFrags"			"m_iFrags"
    13 		}
    14 		"Offsets"
    15 		{
    16 			"m_iHealth"
    17 			{
    18 				"class"		"CBasePlayer"
    19 				"prop"		"m_iHealth"
    20 			}
    21 			"m_lifeState"
    22 			{
    23 				"class"		"CBasePlayer"
    24 				"prop"		"m_lifeState"
    25 			}
    26 		}
    27 	}
    28 	
    29 	/* General Temp Entities */
    30 	"#default"
    31 	{
    32 		"#supported"
    33 		{
    34 			"game"		"dod"
    35 			"game"		"tf"
    36 		}
    37 
    38 		"Offsets"
    39 		{
    40 			/* Offset into CBaseTempEntity constructor */
    41 			"s_pTempEntities"
    42 			{
    43 				"windows"	"17"
    44 			}
    45 			"GetTEName"
    46 			{
    47 				"windows"	"4"
    48 				"linux"		"4"
    49 			}
    50 			"GetTENext"
    51 			{
    52 				"windows"	"8"
    53 				"linux"		"8"
    54 			}
    55 			"TE_GetServerClass"
    56 			{
    57 				"windows"	"0"
    58 				"linux"		"0"
    59 			}
    60 		}
    61 
    62 		"Signatures"
    63 		{
    64 			"CBaseTempEntity"
    65 			{
    66 				"library"	"server"
    67 				"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"
    68 			}
    69 			"s_pTempEntities"
    70 			{
    71 				"library"	"server"
    72 				"linux"		"@_ZN15CBaseTempEntity15s_pTempEntitiesE"
    73 			}
    74 		}
    75 	}
    76 	
    77 	/* Create Entity Signatures */
    78 	"#default"
    79 	{
    80 		"#supported"
    81 		{
    82 			"game"		"dod"
    83 			"game"		"tf"
    84 		}
    85 
    86 		"Signatures"
    87 		{
    88 			"DispatchSpawn"
    89 			{
    90 				"library"	"server"
    91 				"linux"		"@_Z13DispatchSpawnP11CBaseEntity"
    92 				"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"
    93 			}
    94 			"CreateEntityByName"
    95 			{
    96 				"library"	"server"
    97 				"linux"		"@_Z18CreateEntityByNamePKci"
    98 				"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"
    99 			}
   100 		}
   101 	}
   102 
   103 	/* CGlobalEntityList */
   104 	"#default"
   105 	{
   106 		"#supported"
   107 		{
   108 			"game"		"dod"
   109 			"game"		"tf"
   110 		}
   111 		
   112 		"Offsets"
   113 		{
   114 			/* Offset into LevelShutdown */
   115 			"gEntList"
   116 			{
   117 				"windows"	"11"
   118 			}
   119 		}
   120 		
   121 		"Signatures"
   122 		{
   123 			"LevelShutdown"
   124 			{
   125 				"library"	"server"
   126 				"windows"	"\xE8\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xE8"
   127 			}
   128 			"gEntList"
   129 			{
   130 				"library"	"server"
   131 				"linux"		"@gEntList"
   132 			}
   133 			
   134 			/* Functions in CGlobalEntityList */
   135 			"FindEntityByClassname"
   136 			{
   137 				"library"	"server"
   138 				"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"
   139 				"linux"		"@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
   140 			}
   141 		}
   142 	}
   143 
   144 	/* General GameRules */
   145 	"#default"
   146 	{
   147 		"#supported"
   148 		{
   149 			"game"		"dod"
   150 			"game"		"tf"
   151 		}
   152 		
   153 		"Offsets"
   154 		{
   155 			/* Offset into CreateGameRulesObject */
   156 			"g_pGameRules"
   157 			{
   158 				"windows"	"2"
   159 			}
   160 		}
   161 		
   162 		"Signatures"
   163 		{
   164 			/* This signature sometimes has multiple matches, but this
   165 			 * does not matter as g_pGameRules is involved in all of them.
   166 			 * The same g_pGameRules offset applies to each match.
   167 			 *
   168 			 * Sometimes this block of bytes is at the beginning of the static
   169 			 * CreateGameRulesObject function and sometimes it is in the middle
   170 			 * of an entirely different function. This depends on the game.
   171 			 */
   172 			"CreateGameRulesObject"
   173 			{
   174 				"library"	"server"
   175 				"windows"	"\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\x6A\x01\xFF\xD2"
   176 			}
   177 			"g_pGameRules"
   178 			{
   179 				"library"	"server"
   180 				"linux"		"@g_pGameRules"
   181 			}
   182 		}
   183 	}
   184 
   185 	/* IServer interface pointer */
   186 	"#default"
   187 	{
   188 		"Offsets"
   189 		{
   190 			/* Offset into IVEngineServer::CreateFakeClient */
   191 			"sv"
   192 			{
   193 				"windows"	"6"
   194 			}
   195 		}
   196 
   197 		"Signatures"
   198 		{
   199 			/* CBaseServer object for IServer interface */
   200 			"sv"
   201 			{
   202 				"library"	"engine"
   203 				"linux"		"@sv"
   204 			}
   205 		}
   206 	}
   207 	
   208 	/* EntityFactoryDictionary function */
   209 	"#default"
   210 	{
   211 		"Signatures"
   212 		{
   213 			"EntityFactory"
   214 			{
   215 				"library"	"server"
   216 				"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"
   217 				"linux"		"@_Z23EntityFactoryDictionaryv"
   218 			}
   219 		}
   220 	}
   221 
   222 	/* CBaseEntityOutput::FireOutput */
   223 	"#default"
   224 	{
   225 		"#supported"
   226 		{
   227 			"game"		"dod"
   228 			"game"		"tf"
   229 		}
   230 		"Signatures"
   231 		{
   232 			"FireOutput"
   233 			{
   234 				"library"	"server"
   235 				"windows"	"\x81\xEC\x1C\x01\x00\x00\x53\x55\x56\x8B\x71\x14\x85\xF6"
   236 				"linux"		"@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
   237 			}
   238 		}
   239 		"Offsets"
   240 		{
   241 			"FireOutputBackup"
   242 			{
   243 				"windows"	"6"
   244 				"linux"		"10"
   245 			}
   246 		}
   247 	}
   248 	
   249 	/* SetUserInfo data */
   250 	"#default"
   251 	{
   252 		"Offsets"
   253 		{
   254 			/**
   255 			 * CBaseClient::SetUserCVar(char  const*,char  const*);
   256 			 * Linux offset straight from VTable dump.
   257 			 * Windows offset is crazy. Found the windows 'SetName' function using string "(%d)%-0.*s"
   258 			 * Cross referenced back to the vtable and counted manually (SetUserCvar is 1 higher, offsets start from 1)
   259 			 */
   260 			"SetUserCvar"
   261 			{
   262 				"windows"	"17"
   263 				"linux"		"55"
   264 			}
   265 			/**
   266 			 * Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made.
   267 			 * Find CBaseClient::UpdateUserSettings (strings "net_maxroutable", "cl_updaterate" etc) and the offset is set to 0 near the end.
   268 			 * Linux: 	mov     byte ptr [esi+98h], 0
   269 			 * Win:	mov     byte ptr [esi+0A4h], 0
   270 			 */
   271 			"InfoChanged"
   272 			{
   273 				"windows"	"164"
   274 				"linux"		"152"
   275 			}
   276 		}
   277 	}
   278 
   279 	/* Team Fortress 2 */
   280 	"tf"
   281 	{
   282 		"Offsets"
   283 		{
   284 			"RemovePlayerItem"
   285 			{
   286 				"windows"	"238"
   287 				"linux"		"239"
   288 			}
   289 			"Weapon_GetSlot"
   290 			{
   291 				"windows"	"236"
   292 				"linux"		"237"
   293 			}
   294 			"Ignite"
   295 			{
   296 				"windows"	"193"
   297 				"linux"		"194"
   298 			}
   299 			"Extinguish"
   300 			{
   301 				"windows"	"197"
   302 				"linux"		"198"
   303 			}
   304 			"Teleport"
   305 			{
   306 				"windows"	"100"
   307 				"linux"		"101"
   308 			}
   309 			"CommitSuicide"
   310 			{
   311 				"windows"	"388"
   312 				"linux"		"388"
   313 			}
   314 			"GetVelocity"
   315 			{
   316 				"windows"	"130"
   317 				"linux"		"131"
   318 			}
   319 			"EyeAngles"
   320 			{
   321 				"windows"	"122"
   322 				"linux"		"123"
   323 			}
   324 			"DispatchKeyValue"
   325 			{
   326 				"windows"	"29"
   327 				"linux"		"28"
   328 			}
   329 			"DispatchKeyValueFloat"
   330 			{
   331 				"windows"	"28"
   332 				"linux"		"29"
   333 			}
   334 			"DispatchKeyValueVector"
   335 			{
   336 				"windows"	"27"
   337 				"linux"		"30"
   338 			}
   339 			"SetEntityModel"
   340 			{
   341 				"windows"	"23"
   342 				"linux"		"24"
   343 			}
   344 			"AcceptInput"
   345 			{
   346 				"windows"	"34"
   347 				"linux"		"35"
   348 			}
   349 			"Activate"
   350 			{
   351 				"windows"	"31"
   352 				"linux"		"32"
   353 			}
   354 		}
   355 	}
   356 	
   357 	/* Day of Defeat: Source */
   358 	"dod"
   359 	{
   360 		"Offsets"
   361 		{
   362 			"RemovePlayerItem"
   363 			{
   364 				"windows"	"238"
   365 				"linux"		"239"
   366 			}
   367 			"Weapon_GetSlot"
   368 			{
   369 				"windows"	"236"
   370 				"linux"		"237"
   371 			}
   372 			"Ignite"
   373 			{
   374 				"windows"	"193"
   375 				"linux"		"194"
   376 			}
   377 			"Extinguish"
   378 			{
   379 				"windows"	"197"
   380 				"linux"		"198"
   381 			}
   382 			"Teleport"
   383 			{
   384 				"windows"	"100"
   385 				"linux"		"101"
   386 			}
   387 			"CommitSuicide"
   388 			{
   389 				"windows"	"388"
   390 				"linux"		"388"
   391 			}
   392 			"GetVelocity"
   393 			{
   394 				"windows"	"130"
   395 				"linux"		"131"
   396 			}
   397 			"EyeAngles"
   398 			{
   399 				"windows"	"122"
   400 				"linux"		"123"
   401 			}
   402 			"AcceptInput"
   403 			{
   404 				"windows"	"34"
   405 				"linux"		"35"
   406 			}
   407 			"DispatchKeyValue"
   408 			{
   409 				"windows"	"29"
   410 				"linux"		"28"
   411 			}
   412 			"DispatchKeyValueFloat"
   413 			{
   414 				"windows"	"28"
   415 				"linux"		"29"
   416 			}
   417 			"DispatchKeyValueVector"
   418 			{
   419 				"windows"	"27"
   420 				"linux"		"30"
   421 			}
   422 			"SetEntityModel"
   423 			{
   424 				"windows"	"23"
   425 				"linux"		"24"
   426 			}
   427 			"WeaponEquip"
   428 			{
   429 				"windows"	"229"
   430 				"linux"		"230"
   431 			}
   432 			"Activate"
   433 			{
   434 				"windows"	"31"
   435 				"linux"		"32"
   436 			}
   437 		}
   438 	}
   439 }