gamedata/sdktools.games/engine.css.txt
author Nicholas Hastings <skamonkey@gmail.com>
Tue Feb 05 17:20:00 2013 -0500 (2013-02-05)
changeset 3764 98e4ec3deca8
parent 3653 1dc1224c6b76
child 4366 1fb667b34233
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 	/* General Temp Entities */
    15 	"#default"
    16 	{
    17 		"Offsets"
    18 		{
    19 			/* Offset into CBaseTempEntity constructor */
    20 			"s_pTempEntities"
    21 			{
    22 				"windows"	"19"
    23 			}
    24 			"GetTEName"
    25 			{
    26 				"windows"	"4"
    27 				"linux"		"4"
    28 				"mac"		"4"
    29 			}
    30 			"GetTENext"
    31 			{
    32 				"windows"	"8"
    33 				"linux"		"8"
    34 				"mac"		"8"
    35 			}
    36 			"TE_GetServerClass"
    37 			{
    38 				"windows"	"0"
    39 				"linux"		"0"
    40 				"mac"		"0"
    41 			}
    42 		}
    43 
    44 		"Signatures"
    45 		{
    46 			"CBaseTempEntity"
    47 			{
    48 				"library"	"server"
    49 				"windows"	"\x55\x8B\xEC\x8B\xC1\x8B\x4D\x2A\xC7\x00\x2A\x2A\x2A\x2A\x89\x48"
    50 			}
    51 			"s_pTempEntities"
    52 			{
    53 				"library"	"server"
    54 				"linux"		"@_ZN15CBaseTempEntity15s_pTempEntitiesE"
    55 				"mac"		"@_ZN15CBaseTempEntity15s_pTempEntitiesE"
    56 			}
    57 		}
    58 	}
    59 	
    60 	/* CGlobalEntityList */
    61 	"#default"
    62 	{
    63 		"Signatures"
    64 		{
    65 			/* Functions in CGlobalEntityList */
    66 			"FindEntityByClassname"
    67 			{
    68 				"library"	"server"
    69 				"windows"	"\x55\x8B\xEC\x53\x56\x8B\xF1\x8B\x4D\x2A\x57\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\xFF\xD2\x8B\x00\x25\xFF\x0F\x00\x00\x40\x03\xC0\x8B\x3C\xC6\xEB\x2A\x8B"
    70 				"linux"		"@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
    71 				"mac"		"@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
    72 			}
    73 		}
    74 	}
    75 
    76 	/* General GameRules */
    77 	"#default"
    78 	{
    79 		"Offsets"
    80 		{
    81 			/* Offset into CreateGameRulesObject */
    82 			"g_pGameRules"
    83 			{
    84 				"windows"	"2"
    85 			}
    86 		}
    87 		
    88 		"Signatures"
    89 		{
    90 			/* This signature sometimes has multiple matches, but this
    91 			 * does not matter as g_pGameRules is involved in all of them.
    92 			 * The same g_pGameRules offset applies to each match.
    93 			 *
    94 			 * Sometimes this block of bytes is at the beginning of the static
    95 			 * CreateGameRulesObject function and sometimes it is in the middle
    96 			 * of an entirely different function. This depends on the game.
    97 			 */
    98 			"CreateGameRulesObject"
    99 			{
   100 				"library"	"server"
   101 				"windows"	"\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\x6A\x01\xFF\xD2"
   102 			}
   103 			"g_pGameRules"
   104 			{
   105 				"library"	"server"
   106 				"linux"		"@g_pGameRules"
   107 				"mac"		"@g_pGameRules"
   108 			}
   109 		}
   110 	}
   111 
   112 	/* IServer interface pointer */
   113 	"#default"
   114 	{
   115 		"Keys"
   116 		{
   117 			/* Signature for the beginning of IVEngineServer::CreateFakeClientEx.
   118 			 *
   119 			 * The engine binary is not actually scanned in order to look for
   120 			 * this. SourceHook is used to used to determine the address of the
   121 			 * function and this signature is used to verify that it contains
   122 			 * the expected code. A pointer to sv (IServer interface) is used
   123 			 * here.
   124 			 */
   125 			"CreateFakeClient_Windows"	"\x55\x8B\xEC\x8B\x2A\x2A\x50\xB9\x2A\x2A\x2A\x2A\xE8"
   126 		}
   127 		
   128 		"Offsets"
   129 		{
   130 			/* Offset into IVEngineServer::CreateFakeClient */
   131 			"sv"
   132 			{
   133 				"windows"	"8"
   134 			}
   135 		}
   136 
   137 		"Signatures"
   138 		{
   139 			/* CBaseServer object for IServer interface */
   140 			"sv"
   141 			{
   142 				"library"	"engine"
   143 				"linux"		"@sv"
   144 				"mac"		"@sv"
   145 			}
   146 		}
   147 	}
   148 	
   149 	/* EntityFactoryDictionary function */
   150 	"#default"
   151 	{
   152 		"Signatures"
   153 		{
   154 			"EntityFactory"
   155 			{
   156 				"library"	"server"
   157 				"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"
   158 				"linux"		"@_Z23EntityFactoryDictionaryv"
   159 				"mac"		"@_Z23EntityFactoryDictionaryv"
   160 			}
   161 		}
   162 	}
   163 
   164 	/* CBaseEntityOutput::FireOutput */
   165 	"#default"
   166 	{
   167 		"Signatures"
   168 		{
   169 			"FireOutput"
   170 			{
   171 				"library"	"server"
   172 				"windows"	"\x55\x8B\xEC\x81\x2A\x2A\x2A\x2A\x2A\x53\x56\x8B\x2A\x2A\x57\x89"
   173 				"linux"		"@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
   174 				"mac"		"@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
   175 			}
   176 		}
   177 	}
   178 	
   179 	/* SetUserInfo data */
   180 	"#default"
   181 	{
   182 		"Offsets"
   183 		{
   184 			/**
   185 			 * CBaseClient::SetUserCVar(char  const*,char  const*);
   186 			 * Linux offset straight from VTable dump.
   187 			 * Windows offset is crazy. Found the windows SetName function using string "(%d)%-0.*s"
   188 			 * Cross referenced back to the vtable and counted manually (SetUserCvar is 1 higher, offsets start from 1)
   189 			 */
   190 			"SetUserCvar"
   191 			{
   192 				"windows"	"18"
   193 				"linux"		"58"
   194 				"mac"		"58"
   195 			}
   196 			/**
   197 			 * Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made.
   198 			 * Find CBaseClient::UpdateUserSettings (strings "net_maxroutable", "cl_updaterate" etc) and the offset is set to 0 near the end.
   199 			 * Linux: 	mov     byte ptr [esi+98h], 0
   200 			 * Win:	mov     byte ptr [esi+0A4h], 0
   201 			 */
   202 			"InfoChanged"
   203 			{
   204 				"windows"	"140"
   205 				"linux"		"140"
   206 				"mac"		"140"
   207 			}
   208 		}
   209 	}
   210 }