gamedata/sdktools.games/engine.ep1.txt
author Nicholas Hastings <skamonkey@gmail.com>
Tue Feb 01 13:50:17 2011 -0500 (2011-02-01)
changeset 3190 a5e3a84a74e0
parent 3124 5d019af9de4e
child 3289 df9727469f33
permissions -rw-r--r--
Updated CSPromod 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 		"#supported"
    18 		{
    19 			"game"		"ship"
    20 			"game"		"!Dystopia"
    21 			"game"		"insurgency"
    22 			"game"		"sourceforts"
    23 			"game"		"FortressForever"
    24 			"game"		"synergy"
    25 			"game"		"hidden"
    26 			"game"		"zombie_master"
    27 			"game"		"NeotokyoSource"
    28 		}
    29 
    30 		"Offsets"
    31 		{
    32 			/* Offset into CBaseTempEntity constructor */
    33 			"s_pTempEntities"
    34 			{
    35 				"windows"	"17"
    36 			}
    37 			"GetTEName"
    38 			{
    39 				"windows"	"4"
    40 				"linux"		"4"
    41 			}
    42 			"GetTENext"
    43 			{
    44 				"windows"	"8"
    45 				"linux"		"8"
    46 			}
    47 			"TE_GetServerClass"
    48 			{
    49 				"windows"	"1"
    50 				"linux"		"1"
    51 			}
    52 		}
    53 
    54 		"Signatures"
    55 		{
    56 			"CBaseTempEntity"
    57 			{
    58 				"library"	"server"
    59 				"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"
    60 			}
    61 			"s_pTempEntities"
    62 			{
    63 				"library"	"server"
    64 				"linux"		"@_ZN15CBaseTempEntity15s_pTempEntitiesE"
    65 			}
    66 		}
    67 	}
    68 	
    69 	/* General GameRules */
    70 	"#default"
    71 	{
    72 		"#supported"
    73 		{
    74 			"game"		"garrysmod"
    75 			"game"		"ship"
    76 			"game"		"!Dystopia"
    77 			"game"		"sourceforts"
    78 			"game"		"FortressForever"
    79 			"game"		"synergy"
    80 			"game"		"hidden"
    81 			"game"		"NeotokyoSource"
    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\x6A\x01\xFF\x50"
   107 			}
   108 			"g_pGameRules"
   109 			{
   110 				"library"	"server"
   111 				"linux"		"@g_pGameRules"
   112 			}
   113 		}
   114 	}
   115 	
   116 	/* CGlobalEntityList */
   117 	"#default"
   118 	{
   119 		"#supported"
   120 		{
   121 			"game"		"garrysmod"
   122 			"game"		"ship"
   123 			"game"		"sourceforts"
   124 			"game"		"FortressForever"
   125 			"game"		"synergy"
   126 			"game"		"hidden"
   127 			"game"		"zombie_master"
   128 			"game"		"NeotokyoSource"
   129 		}
   130 		
   131 		"Signatures"
   132 		{	
   133 			/* Functions in CGlobalEntityList */
   134 			"FindEntityByClassname"
   135 			{
   136 				"library"	"server"
   137 				"windows"	"\x53\x55\x56\x8B\xF1\x8B\x4C\x24\x2A\x85\xC9\x57\x74\x2A\x8B\x01\xFF\x50\x2A\x8B\x08\x81\xE1\x2A\x2A\x2A\x2A\x83\xC1\x2A\xC1\xE1\x2A\x8B\x3C\x31\xEB\x2A\x8B\xBE\x2A\x2A\x2A\x2A\x85\xFF\x74\x2A\x8B\x5C\x24\x2A\x8B\x2D\x2A\x2A\x2A\x2A\x8D\x9B\x00\x00\x00\x00\x8B\x37\x85\xF6\x75\x2A\x68\x2A\x2A\x2A\x2A\xFF\x2A\x83\xC4\x2A\xEB\x2A\x39"
   138 				"linux"		"@_ZN17CGlobalEntityList21FindEntityByClassnameEP11CBaseEntityPKc"
   139 			}
   140 		}
   141 	}
   142 
   143 	/* Create Entity Signatures */
   144 	"#default"
   145 	{
   146 		"#supported"
   147 		{
   148 			"game"		"sourceforts"
   149 			"game"		"synergy"
   150 			"game"		"hidden"
   151 			"game"		"FortressForever"
   152 			"game"		"NeotokyoSource"
   153 		}
   154 
   155 		"Signatures"
   156 		{
   157 			"DispatchSpawn"
   158 			{
   159 				"library"	"server"
   160 				"linux"		"@_Z13DispatchSpawnP11CBaseEntity"
   161 				"windows"	"\x53\x55\x56\x8B\x74\x24\x10\x85\xF6\x57\x0F\x84\x2A\x2A\x2A\x2A\x8B\x1D\x2A\x2A\x2A\x2A\x8B\x03\x8B\xCB\xFF\x50\x60"
   162 			}
   163 			"CreateEntityByName"
   164 			{
   165 				"library"	"server"
   166 				"linux"		"@_Z18CreateEntityByNamePKci"
   167 				"windows"	"\x56\x8B\x74\x24\x0C\x83\xFE\xFF\x57\x8B\x7C\x24\x0C\x74\x25\x8B\x0D\x2A\x2A\x2A\x2A\x8B\x01\x56\xFF\x50\x54\x85\xC0"
   168 			}
   169 		}
   170 	}
   171 
   172 	/* IServer interface pointer */
   173 	"#default"
   174 	{
   175 		"Keys"
   176 		{
   177 			/* Signature for the beginning of IVEngineServer::CreateFakeClient.
   178 			 *
   179 			 * The engine binary is not actually scanned in order to look for
   180 			 * this. SourceHook is used to used to determine the address of the
   181 			 * function and this signature is used to verify that it contains
   182 			 * the expected code. A pointer to sv (IServer interface) is used
   183 			 * here.
   184 			 */
   185 			"CreateFakeClient_Windows"	"\x8B\x44\x24\x2A\x50\xB9\x2A\x2A\x2A\x2A\xE8"
   186 		}
   187 		
   188 		"Offsets"
   189 		{
   190 			/* Offset into IVEngineServer::CreateFakeClient */
   191 			"sv"
   192 			{
   193 				"windows"	"6"
   194 			}
   195 		}
   196 
   197 		"Signatures"
   198 		{
   199 			/* CBaseServer object for IServer interface */
   200 			"sv"
   201 			{
   202 				"library"	"engine"
   203 				"linux"		"@sv"
   204 			}
   205 		}
   206 	}
   207 	
   208 	/* EntityFactoryDictionary function */
   209 	"#default"
   210 	{
   211 		"Signatures"
   212 		{
   213 			"EntityFactory"
   214 			{
   215 				"library"	"server"
   216 				"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"
   217 				"linux"		"@_Z23EntityFactoryDictionaryv"
   218 			}
   219 		}
   220 	}
   221 	/* CBaseEntityOutput::FireOutput */
   222 	"#default"
   223 	{
   224 		"#supported"
   225 		{
   226 			"game"		"NeotokyoSource"
   227 			"game"		"zombie_master"
   228 		}
   229 		"Signatures"
   230 		{
   231 			"FireOutput"
   232 			{
   233 				"library"	"server"
   234 				"windows"	"\x81\xEC\x1C\x03\x00\x00\x53\x55\x56\x8B\x71\x14"
   235 				"linux"		"@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
   236 			}
   237 		}
   238 	}
   239 
   240 	/* SetUserInfo data */
   241 	"#default"
   242 	{
   243 		"Offsets"
   244 		{
   245 			/**
   246 			 * CBaseClient::SetUserCVar(char  const*,char  const*);
   247 			 * Linux offset straight from VTable dump.
   248 			 * Windows offset is crazy. Found the windows SetName function using string "(%d)%-0.*s"
   249 			 * Cross referenced back to the vtable and counted manually (SetUserCvar is 1 higher, offsets start from 1)
   250 			 */
   251 			"SetUserCvar"
   252 			{
   253 				"windows"	"17"
   254 				"linux"		"53"
   255 			}
   256 			/**
   257 			 * Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made.
   258 			 * Find CBaseClient::UpdateUserSettings (strings "net_maxroutable", "cl_updaterate" etc) and the offset is set to 0 near the end.
   259 			 * Linux: 	mov     byte ptr [esi+98h], 0
   260 			 * Win:	mov     byte ptr [esi+0A4h], 0
   261 			 */
   262 			"InfoChanged"
   263 			{
   264 				"windows"	"164"
   265 				"linux"		"152"
   266 			}
   267 		}
   268 	}
   269 }