gamedata/sdktools.games/engine.l4d.txt
author Nicholas Hastings <skamonkey@gmail.com>
Wed May 25 08:27:27 2011 -0400 (2011-05-25)
changeset 3280 7aea1316eff7
parent 3146 0785a5a1316d
child 3333 e247490894a1
permissions -rw-r--r--
Switched to using IServerTools in SDKTools where possible. (bug 4899, r=fyren).
     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 	/* Sounds */
    15 	"#default"
    16 	{
    17 		"Keys"
    18 		{
    19 			"SlapSoundCount"	"2"
    20 			"SlapSound1"		"player/damage1.wav"
    21 			"SlapSound2"		"player/damage2.wav"
    22 		}
    23 	}
    24 	
    25 	/* General Temp Entities */
    26 	"#default"
    27 	{
    28 		"#supported"
    29 		{
    30 			"game"		"left4dead"
    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 				"mac"		"4"
    45 			}
    46 			"GetTENext"
    47 			{
    48 				"windows"	"8"
    49 				"linux"		"8"
    50 				"mac"		"8"
    51 			}
    52 			"TE_GetServerClass"
    53 			{
    54 				"windows"	"0"
    55 				"linux"		"0"
    56 				"mac"		"0"
    57 			}
    58 		}
    59 
    60 		"Signatures"
    61 		{
    62 			"CBaseTempEntity"
    63 			{
    64 				"library"	"server"
    65 				"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"
    66 			}
    67 			"s_pTempEntities"
    68 			{
    69 				"library"	"server"
    70 				"linux"		"@_ZN15CBaseTempEntity15s_pTempEntitiesE"
    71 				"mac"		"@_ZN15CBaseTempEntity15s_pTempEntitiesE"
    72 			}
    73 		}
    74 	}
    75 
    76 	/* General GameRules */
    77 	"#default"
    78 	{
    79 		"#supported"
    80 		{
    81 			"game"		"left4dead"
    82 		}
    83 		
    84 		"Offsets"
    85 		{
    86 			/* Offset into CreateGameRulesObject */
    87 			"g_pGameRules"
    88 			{
    89 				"windows"	"2"
    90 			}
    91 		}
    92 		
    93 		"Signatures"
    94 		{
    95 			/* This signature sometimes has multiple matches, but this
    96 			 * does not matter as g_pGameRules is involved in all of them.
    97 			 * The same g_pGameRules offset applies to each match.
    98 			 *
    99 			 * Sometimes this block of bytes is at the beginning of the static
   100 			 * CreateGameRulesObject function and sometimes it is in the middle
   101 			 * of an entirely different function. This depends on the game.
   102 			 */
   103 			"CreateGameRulesObject"
   104 			{
   105 				"library"	"server"
   106 				"windows"	"\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\x6A\x01\xFF\xD2"
   107 			}
   108 			"g_pGameRules"
   109 			{
   110 				"library"	"server"
   111 				"linux"		"@g_pGameRules"
   112 				"mac"		"@g_pGameRules"
   113 			}
   114 		}
   115 	}
   116 
   117 	/* IServer interface pointer */
   118 	"#default"
   119 	{
   120 		"Keys"
   121 		{
   122 			/* Signature for the beginning of IVEngineServer::CreateFakeClient.
   123 			 *
   124 			 * The engine binary is not actually scanned in order to look for
   125 			 * this. SourceHook is used to used to determine the address of the
   126 			 * function and this signature is used to verify that it contains
   127 			 * the expected code. A pointer to sv (IServer interface) is used
   128 			 * here.
   129 			 */
   130 			"CreateFakeClient_Windows"	"\x8B\x44\x24\x2A\x50\xB9\x2A\x2A\x2A\x2A\xE8"
   131 		}
   132 		
   133 		"Offsets"
   134 		{
   135 			/* Offset into IVEngineServer::CreateFakeClient */
   136 			"sv"
   137 			{
   138 				"windows"	"6"
   139 			}
   140 		}
   141 
   142 		"Signatures"
   143 		{
   144 			/* CBaseServer object for IServer interface */
   145 			"sv"
   146 			{
   147 				"library"	"engine"
   148 				"linux"		"@sv"
   149 				"mac"		"@sv"
   150 			}
   151 		}
   152 	}
   153 	
   154 	/* EntityFactoryDictionary function */
   155 	"#default"
   156 	{
   157 		"Signatures"
   158 		{
   159 			"EntityFactory"
   160 			{
   161 				"library"	"server"
   162 				"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"
   163 				"linux"		"@_Z23EntityFactoryDictionaryv"
   164 				"mac"		"@_Z23EntityFactoryDictionaryv"
   165 			}
   166 		}
   167 	}
   168 
   169 	/* CBaseEntityOutput::FireOutput */
   170 	"#default"
   171 	{
   172 		"#supported"
   173 		{
   174 			"game"		"left4dead"
   175 		}
   176 		"Signatures"
   177 		{
   178 			"FireOutput"
   179 			{
   180 				"library"	"server"
   181 				"windows"	"\x81\xEC\x1C\x01\x00\x00\x53\x55\x56\x8B\x71\x14\x85\xF6"
   182 				"linux"		"@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
   183 				"mac"		"@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
   184 			}
   185 		}
   186 	}
   187 	
   188 	/* SetUserInfo data */
   189 	"#default"
   190 	{
   191 		"Offsets"
   192 		{
   193 			/**
   194 			 * CBaseClient::SetUserCVar(char  const*,char  const*);
   195 			 * Linux offset straight from VTable dump.
   196 			 * Windows offset is crazy. Found the windows SetName function using string "(%d)%-.*s" (aD_S in IDA)
   197 			 * Cross referenced back to the vtable and counted manually (SetUserCvar is 1 higher, offsets start from 1)
   198 			 */
   199 			"SetUserCvar"
   200 			{
   201 				"windows"	"17"
   202 				"linux"		"63"
   203 				"mac"		"63"
   204 			}
   205 			/**
   206 			 * Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made.
   207 			 * Find CBaseClient::UpdateUserSettings (strings "net_maxroutable", "cl_updaterate" etc) and the offset is set to 0 near the end.
   208 			 * Linux: 	mov     byte ptr [esi+0B0h], 0
   209 			 * Win:		mov     byte ptr [esi+0B0h], 0
   210 			 */
   211 			"InfoChanged"
   212 			{
   213 				"windows"	"176"
   214 				"linux"		"176"
   215 				"mac"		"176"
   216 			}
   217 		}
   218 	}
   219 	
   220 	/* Left 4 Dead */
   221 	"left4dead"
   222 	{
   223 		"Offsets"
   224 		{
   225 			"GiveNamedItem"
   226 			{
   227 				"windows"	"482"
   228 				"linux"		"483"
   229 				"mac"		"483"
   230 			}
   231 			"RemovePlayerItem"
   232 			{
   233 				"windows"	"269"
   234 				"linux"		"270"
   235 				"mac"		"270"
   236 			}
   237 			"Weapon_GetSlot"
   238 			{
   239 				"windows"	"267"
   240 				"linux"		"268"
   241 				"mac"           "268"
   242 			}
   243 			"Ignite"
   244 			{
   245 				"windows"	"206"
   246 				"linux"		"207"
   247 				"mac"           "207"
   248 			}
   249 			"Extinguish"
   250 			{
   251 				"windows"	"210"
   252 				"linux"		"211"
   253 				"mac"           "211"
   254 			}
   255 			"Teleport"
   256 			{
   257 				"windows"	"105"
   258 				"linux"		"106"
   259 				"mac"           "106"
   260 			}
   261 			"CommitSuicide"
   262 			{
   263 				"windows"	"449"
   264 				"linux"		"449"
   265 				"mac"           "449"
   266 			}
   267 			"GetVelocity"
   268 			{
   269 				"windows"	"136"
   270 				"linux"		"137"
   271 				"mac"           "137"
   272 			}
   273 			"EyeAngles"
   274 			{
   275 				"windows"	"127"
   276 				"linux"		"128"
   277 				"mac"           "128"
   278 			}
   279 			"AcceptInput"
   280 			{
   281 				"windows"	"37"
   282 				"linux"		"38"
   283 				"mac"           "38"
   284 			}
   285 			"SetEntityModel"
   286 			{
   287 				"windows"	"23"
   288 				"linux"		"24"
   289 				"mac"           "24"
   290 			}
   291 			"WeaponEquip"
   292 			{
   293 				"windows"	"260"
   294 				"linux"		"261"
   295 				"mac"           "261"
   296 			}
   297 			"Activate"
   298 			{
   299 				"windows"	"31"
   300 				"linux"		"32"
   301 				"mac"           "32"
   302 			}
   303 			"PlayerRunCmd"
   304 			{
   305 				"windows"	"427"
   306 				"linux"		"428"
   307 				"mac"           "428"
   308 			}
   309 		}
   310 	}
   311 }