/**
 * Do not edit this file.  Any changes will be overwritten by the gamedata
 * updater or by upgrading your SourceMod install.
 *
 * To override data in this file, create a subdirectory named "custom" and
 * place your own gamedata file(s) inside of it.  Such files will be parsed
 * after SM's own.
 *
 * For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(SourceMod)
 */

"Games"
{
	/* General Temp Entities */
	"#default"
	{
		"Offsets"
		{
			"GetTEName"
			{
				"windows"	"4"
				"linux"		"4"
				"mac"		"4"
			}
			"GetTENext"
			{
				"windows"	"8"
				"linux"		"8"
				"mac"		"8"
			}
			"TE_GetServerClass"
			{
				"windows"	"0"
				"linux"		"0"
				"mac"		"0"
			}
		}
	}
	
	/* CBaseEntityOutput::FireOutput */
	"#default"
	{
		"Signatures"
		{
			"FireOutput"
			{
				"library"	"server"
				"windows"	"\x55\x8B\xEC\x81\xEC\x2A\x2A\x2A\x2A\xA1\x2A\x2A\x2A\x2A\x33\xC5\x89\x45\xFC\x53\x8B\x5D\x20\x8B\xC1\x8B\x4D\x1C\x56\x57\x8B"
				"linux"		"@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
				"mac"		"@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
			}
		}
	}

	/* CBaseAnimating::LookupAttachment */
	"#default"
	{
		"Signatures"
		{
			"LookupAttachment"
			{
				"library"	"server"
				"windows"	"\x55\x8B\xEC\x56\x8B\xF1\x80\xBE\x31\x03\x00\x00\x00\x75\x2A\x83\xBE\x2A\x2A\x00\x00\x00\x75\x2A\xE8\x2A\x2A\x2A\x2A\x85\xC0\x74\x2A\x8B\xCE\xE8\x2A\x2A\x2A\x2A\x8B\x86\x2A\x2A\x00\x00\x85\xC0\x74\x2A\x83\x38\x00\x74\x2A\xFF\x75\x08\x50\xE8\x2A\x2A\x2A\x2A\x83\xC4\x08\x40"
				"linux"		"@_ZN14CBaseAnimating16LookupAttachmentEPKc"
				"mac"		"@_ZN14CBaseAnimating16LookupAttachmentEPKc"
			}
		}
	}
	
	/* SetUserInfo data */
	"#default"
	{
		"Offsets"
		{
			/**
			 * CBaseClient::SetUserCVar(char  const*,char  const*);
			 * Linux offset straight from VTable dump.
			 * Windows offset is crazy. Found the windows SetName function using string "(%d)%-0.*s"
			 * Cross referenced back to the vtable and counted manually (SetUserCvar is 1 higher, offsets start from 1)
			 */
			"SetUserCvar"
			{
				"windows"	"18"
				"linux"		"58"
				"mac"		"58"
			}
			/**
			 * CBaseClient::SetName(char  const*);
			 * Linux offset straight from VTable dump.
			 * Has string "(%d)%-0.*s"
			 */
			"SetClientName"
			{
				"windows"	"17"
				"linux"		"57"
				"mac"		"57"
			}
			/**
			 * Offset into CBaseClient - Used by CBaseServer::UpdateUserSettings to determine when changes have been made.
			 * Find CBaseClient::UpdateUserSettings (strings "net_maxroutable", "cl_updaterate" etc) and the offset is set to 0 near the end.
			 * Linux: 	mov     byte ptr [esi+98h], 0
			 * Win:	mov     byte ptr [esi+0A4h], 0
			 */
			"InfoChanged"
			{
				"windows"	"140"
				"linux"		"140"
				"mac"		"140"
			}
		}
	}
	
	"#default"
	{
		"Offsets"
		{
			"GiveNamedItem"
			{
				"windows"	"422"
				"linux"		"423"
				"mac"		"423"
			}
			"RemovePlayerItem"
			{
				"windows"	"290"
				"linux"		"291"
				"mac"		"291"
			}
			"Weapon_GetSlot"
			{
				"windows"	"288"
				"linux"		"289"
				"mac"		"289"
			}
			"Ignite"
			{
				"windows"	"227"
				"linux"		"228"
				"mac"		"228"
			}
			"Extinguish"
			{
				"windows"	"231"
				"linux"		"232"
				"mac"		"232"
			}
			"Teleport"
			{
				"windows"	"118"
				"linux"		"119"
				"mac"		"119"
			}
			"CommitSuicide"
			{
				"windows"	"464"
				"linux"		"464"
				"mac"		"464"
			}
			"GetVelocity"
			{
				"windows"	"151"
				"linux"		"152"
				"mac"		"152"
			}
			"EyeAngles"
			{
				"windows"	"141"
				"linux"		"142"
				"mac"		"142"
			}
			"SetEntityModel"
			{
				"windows"	"26"
				"linux"		"27"
				"mac"		"27"
			}
			"AcceptInput"
			{
				"windows"	"39"
				"linux"		"40"
				"mac"		"40"
			}
			"WeaponEquip"
			{
				"windows"	"281"
				"linux"		"282"
				"mac"		"282"
			}
			"Activate"
			{
				"windows"	"36"
				"linux"		"37"
				"mac"		"37"
			}
			"PlayerRunCmd"
			{
				"windows"	"443"
				"linux"		"444"
				"mac"		"444"
			}
			"GiveAmmo"
			{
				"windows"	"272"
				"linux"		"273"
				"mac"		"273"
			}
			"SetOwnerEntity"
			{
				"windows"	"19"
				"linux"		"20"
				"mac"		"20"
			}
			"GetAttachment"
			{
				"windows"	"223"
				"linux"		"224"
				"mac"		"224"
			}
		}
		
		"Keys"
		{
			"GameRulesProxy"	"CBM_MP_GameRulesProxy"
			"GameRulesDataTable" "blackmesa_mp_gamerules_data"
		}
	}
}
