gamedata/sdktools.games/engine.swarm.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 	/* General Temp Entities */
    15 	"#default"
    16 	{
    17 		"#supported"
    18 		{
    19 			"game"		"swarm"
    20 			"game"		"dinodday"
    21 		}
    22 
    23 		"Offsets"
    24 		{
    25 			/* Offset into CBaseTempEntity constructor */
    26 			"s_pTempEntities"
    27 			{
    28 				"windows"	"17"
    29 			}
    30 			"GetTEName"
    31 			{
    32 				"windows"	"4"
    33 			}
    34 			"GetTENext"
    35 			{
    36 				"windows"	"8"
    37 			}
    38 			"TE_GetServerClass"
    39 			{
    40 				"windows"	"0"
    41 			}
    42 		}
    43 
    44 		"Signatures"
    45 		{
    46 			"CBaseTempEntity"
    47 			{
    48 				"library"	"server"
    49 				"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"
    50 			}
    51 		}
    52 	}
    53 
    54 	/* General GameRules */
    55 	"#default"
    56 	{
    57 		"#supported"
    58 		{
    59 			"game"		"swarm"
    60 			"game"		"dinodday"
    61 		}
    62 		
    63 		"Offsets"
    64 		{
    65 			/* Offset into CreateGameRulesObject */
    66 			"g_pGameRules"
    67 			{
    68 				"windows"	"2"
    69 			}
    70 		}
    71 		
    72 		"Signatures"
    73 		{
    74 			/* This signature sometimes has multiple matches, but this
    75 			 * does not matter as g_pGameRules is involved in all of them.
    76 			 * The same g_pGameRules offset applies to each match.
    77 			 *
    78 			 * Sometimes this block of bytes is at the beginning of the static
    79 			 * CreateGameRulesObject function and sometimes it is in the middle
    80 			 * of an entirely different function. This depends on the game.
    81 			 */
    82 			"CreateGameRulesObject"
    83 			{
    84 				"library"	"server"
    85 				"windows"	"\x8B\x0D\x2A\x2A\x2A\x2A\x85\xC9\x74\x2A\x8B\x01\x8B\x50\x2A\x6A\x01\xFF\xD2"
    86 			}
    87 		}
    88 	}
    89 
    90 	/* IServer interface pointer */
    91 	"#default"
    92 	{
    93 		"Keys"
    94 		{
    95 			/* Signature for the beginning of IVEngineServer::CreateFakeClient.
    96 			 *
    97 			 * The engine binary is not actually scanned in order to look for
    98 			 * this. SourceHook is used to used to determine the address of the
    99 			 * function and this signature is used to verify that it contains
   100 			 * the expected code. A pointer to sv (IServer interface) is used
   101 			 * here.
   102 			 */
   103 			"CreateFakeClient_Windows"	"\x8B\x44\x24\x2A\x50\xB9\x2A\x2A\x2A\x2A\xE8"
   104 		}
   105 		
   106 		"Offsets"
   107 		{
   108 			/* Offset into IVEngineServer::CreateFakeClient */
   109 			"sv"
   110 			{
   111 				"windows"	"6"
   112 			}
   113 		}
   114 	}
   115 	
   116 	/* EntityFactoryDictionary function */
   117 	"#default"
   118 	{
   119 		"Signatures"
   120 		{
   121 			"EntityFactory"
   122 			{
   123 				"library"	"server"
   124 				"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"
   125 			}
   126 		}
   127 	}
   128 
   129 	/* CBaseEntityOutput::FireOutput */
   130 	"#default"
   131 	{
   132 		"#supported"
   133 		{
   134 			"game"		"swarm"
   135 			"game"		"dinodday"
   136 		}
   137 		"Signatures"
   138 		{
   139 			"FireOutput"
   140 			{
   141 				"library"	"server"
   142 				"windows"	"\x81\xEC\x1C\x01\x00\x00\x53\x55\x56\x8B\x71\x14\x85\xF6"
   143 			}
   144 		}
   145 	}
   146 	
   147 	/* SetUserInfo data */
   148 	"#default"
   149 	{
   150 		"Offsets"
   151 		{
   152 			/**
   153 			 * CBaseClient::SetUserCVar(char  const*,char  const*);
   154 			 * Linux offset straight from VTable dump.
   155 			 * Windows offset is crazy. Found the windows SetName function using string "(%d)%-.*s" (aD_S in IDA)
   156 			 * Cross referenced back to the vtable and counted manually (SetUserCvar is 1 higher, offsets start from 1)
   157 			 */
   158 			"SetUserCvar"
   159 			{
   160 				/* Not 100% sure on this, why would windows change and not linux - TEST ME */
   161 				"windows"	"17"
   162 			}
   163 			/**
   164 			 * Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made.
   165 			 * Find CBaseClient::UpdateUserSettings (strings "net_maxroutable", "cl_updaterate" etc) and the offset is set to 0 near the end.
   166 			 * Linux: 	mov     byte ptr [esi+0B0h], 0
   167 			 * Win:		mov     byte ptr [esi+0B0h], 0
   168 			 *
   169 			 * L4D2/Swarm: This has been moved into CBaseClient::UpdateUserSettings(), rest of the details are still relevant.
   170 			 */
   171 			"InfoChanged"
   172 			{
   173 				"windows"	"176"
   174 			}
   175 		}
   176 	}
   177 }