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