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