gamedata/sdktools.games/engine.dota.txt
author Nicholas Hastings <skamonkey@gmail.com>
Tue Apr 16 12:19:45 2013 -0400 (2013-04-16)
changeset 3897 cf4356fd3524
parent 3866 ae8bff70ceed
child 3923 c604c6143dfb
permissions -rw-r--r--
Updated CS:S 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 	/* Sounds */
    15 	"#default"
    16 	{
    17 		"Keys"
    18 		{
    19 			"SlapSoundCount"	"7"
    20 			"SlapSound1"		"vo/axe/axe_pain_01.mp3"
    21 			"SlapSound1"		"vo/axe/axe_pain_02.mp3"
    22 			"SlapSound1"		"vo/axe/axe_pain_03.mp3"
    23 			"SlapSound1"		"vo/axe/axe_pain_04.mp3"
    24 			"SlapSound1"		"vo/axe/axe_pain_05.mp3"
    25 			"SlapSound1"		"vo/axe/axe_pain_06.mp3"
    26 			"SlapSound1"		"vo/axe/axe_pain_07.mp3"
    27 		}
    28 	}
    29 	
    30 	/* General Temp Entities */
    31 	"#default"
    32 	{
    33 		"Offsets"
    34 		{
    35 			//Offset into CBaseTempEntity constructor
    36 			"s_pTempEntities"
    37 			{
    38 				"windows"	"1"
    39 			}
    40 			"GetTEName"
    41 			{
    42 				"windows"	"4"
    43 			}
    44 			"GetTENext"
    45 			{
    46 				"windows"	"8"
    47 			}
    48 			"TE_GetServerClass"
    49 			{
    50 				"windows"	"0"
    51 			}
    52 		}
    53 
    54 		"Signatures"
    55 		{
    56 			"CBaseTempEntity"
    57 			{
    58 				"library"	"server"
    59 				"windows"	"\xA1\x2A\x2A\x2A\x2A\xF3\x0F\x10\x15\x2A\x2A\x2A\x2A\xF3"
    60 			}
    61 		}
    62 	}
    63 
    64 	/* General GameRules */
    65 	"#default"
    66 	{
    67 		"Keys"
    68 		{
    69 			"GameRulesProxy"	"CDOTAGamerulesProxy"
    70 		}
    71 		
    72 		"Offsets"
    73 		{
    74 			/* Offset into CreateGameRulesObject */
    75 			"g_pGameRules"
    76 			{
    77 				"windows"	"2"
    78 			}
    79 		}
    80 		
    81 		"Signatures"
    82 		{
    83 			/* This signature sometimes has multiple matches, but this
    84 			 * does not matter as g_pGameRules is involved in all of them.
    85 			 * The same g_pGameRules offset applies to each match.
    86 			 *
    87 			 * Sometimes this block of bytes is at the beginning of the static
    88 			 * CreateGameRulesObject function and sometimes it is in the middle
    89 			 * of an entirely different function. This depends on the game.
    90 			 */
    91 			"CreateGameRulesObject"
    92 			{
    93 				"library"	"server"
    94 				"windows"	"\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\x6A\x01\xFF\xD2"
    95 			}
    96 			"g_pGameRules"
    97 			{
    98 				"library"	"server"
    99 			}
   100 		}
   101 	}
   102 
   103 	/* IServer interface pointer */
   104 	"#default"
   105 	{
   106 		"Keys"
   107 		{
   108 			/* Signature for the beginning of IVEngineServer::CreateFakeClient.
   109 			 *
   110 			 * The engine binary is not actually scanned in order to look for
   111 			 * this. SourceHook is used to used to determine the address of the
   112 			 * function and this signature is used to verify that it contains
   113 			 * the expected code. A pointer to sv (IServer interface) is used
   114 			 * here.
   115 			 */
   116 			"CreateFakeClient_Windows"	"\x55\x8B\xEC\x8B\x2A\x2A\x56\x50\xB9\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x85\xC0\x75"
   117 		}
   118 		
   119 		"Offsets"
   120 		{
   121 			/* Offset into IVEngineServer::CreateFakeClient */
   122 			"sv"
   123 			{
   124 				"windows"	"9"
   125 			}
   126 		}
   127 	}
   128 	
   129 	/* Resource Entity override */
   130 	"#default"
   131 	{
   132 		// Dota's player manager does not have DT_PlayerResource embedded, unlike most other games
   133 		"Keys"
   134 		{
   135 			"ResourceEntityClassname"	"dota_player_manager"
   136 		}
   137 	}
   138 	
   139 	/* EntityFactoryDictionary function */
   140 	"#default"
   141 	{
   142 		"Signatures"
   143 		{
   144 			"EntityFactoryFinder"
   145 			{
   146 				// EntityFactoryDictionary gets inlined on Windows in Dota 2. The pointer to the static factory becomes a global.
   147 				"library"	"server"
   148 				"windows"	"\x8B\x15\x2A\x2A\x2A\x2A\x8B\x2A\x2A\x57\xB9\x2A\x2A\x2A\x2A\xFF\xD0\xC7"
   149 				//"linux"		"@_Z23EntityFactoryDictionaryv"
   150 				//"mac"		"@_Z23EntityFactoryDictionaryv"
   151 			}
   152 		}
   153 		
   154 		"Offsets"
   155 		{
   156 			"EntityFactoryOffset"
   157 			{
   158 				"windows" 	"2"
   159 			}
   160 		}
   161 	}
   162 
   163 	/* CBaseEntityOutput::FireOutput */
   164 	"#default"
   165 	{
   166 		"Signatures"
   167 		{
   168 			"FireOutput"
   169 			{
   170 				"library"	"server"
   171 				"windows"	"\x55\x8B\xEC\x83\x2A\x2A\x81\xEC\x2A\x2A\x2A\x2A\x8B\x45\x2A\x53\x8B\x58\x2A\x56\x57\xC7"
   172 			}
   173 		}
   174 	}
   175 	
   176 	/* SetUserInfo data */
   177 	"#default"
   178 	{
   179 		"Offsets"
   180 		{
   181 			/**
   182 			 * CBaseClient::SetUserCVar(char  const*,char  const*);
   183 			 * Linux offset straight from VTable dump.
   184 			 * Windows offset is crazy. Found the windows SetName function using string "(%d)%-.*s" (aD_S in IDA)
   185 			 * Cross referenced back to the vtable and counted manually (SetUserCvar is 1 higher, offsets start from 1)
   186 			 */
   187 			"SetUserCvar"
   188 			{
   189 				"windows"	"26"
   190 			}
   191 			/**
   192 			 * Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made.
   193 			 * Find CBaseClient::UpdateUserSettings (strings "net_maxroutable", "cl_updaterate" etc) and the offset is set to 0 near the end.
   194 			 * Linux: 	mov     byte ptr [esi+0B0h], 0
   195 			 * Win:		mov     byte ptr [esi+0B0h], 0
   196 			 *
   197 			 * L4D2: This has been moved into CBaseClient::UpdateUserSettings(), rest of the details are still relevant.
   198 			 */
   199 			"InfoChanged"
   200 			{
   201 				"windows"	"212"
   202 			}
   203 		}
   204 	}
   205 	
   206 	"dota"
   207 	{
   208 		"Offsets"
   209 		{
   210 			"GiveNamedItem"
   211 			{
   212 				"windows"	"438"
   213 			}
   214 			"RemovePlayerItem"
   215 			{
   216 				"windows"	"300"
   217 			}
   218 			"Weapon_GetSlot"
   219 			{
   220 				"windows"	"289"
   221 			}
   222 			"Ignite"
   223 			{
   224 				"windows"	"231"
   225 			}
   226 			"Extinguish"
   227 			{
   228 				"windows"	"234"
   229 			}
   230 			"Teleport"
   231 			{
   232 				"windows"	"114"
   233 			}
   234 			"CommitSuicide"
   235 			{
   236 				"windows"	"482"
   237 			}
   238 			"GetVelocity"
   239 			{
   240 				"windows"	"147"
   241 			}
   242 			"EyeAngles"
   243 			{
   244 				"windows"	"138"
   245 			}
   246 			"AcceptInput"
   247 			{
   248 				"windows"	"41"
   249 			}
   250 			"SetEntityModel"
   251 			{
   252 				"windows"	"26"
   253 			}
   254 			"WeaponEquip"
   255 			{
   256 				"windows"	"292"
   257 			}
   258 			"Activate"
   259 			{
   260 				"windows"	"37"
   261 			}
   262 			"PlayerRunCmd"
   263 			{
   264 				"windows"	"458"
   265 			}
   266 		}
   267 	}
   268 }