/**
 * 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"
{
	/* Sounds */
	"#default"
	{
		"Keys"
		{
			"SlapSoundCount"	"2"
			"SlapSound1"		"player/damage1.wav"
			"SlapSound2"		"player/damage2.wav"
		}
	}
	
	/* General Temp Entities */
	"#default"
	{
		"Offsets"
		{
			"GetTEName"
			{
				"windows64"	"8"
				"linux64"	"8"
			}
			"GetTENext"
			{
				"windows64"	"16"
				"linux64"	"16"
			}
			"TE_GetServerClass"
			{
				"windows64"	"0"
				"linux64"	"0"
			}
		}
	}
	
	/* CBaseEntityOutput::FireOutput */
	"#default"
	{
		"Signatures"
		{
			"FireOutput"
			{
				"library"	"server"
				"windows64"	"\x48\x8B\xC4\x4C\x89\x40\x18\x48\x89\x50\x10\x48\x89\x48\x08\x57"
			}
		}
	}
	
	/* 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)%-.*s" (aD_S in IDA)
			 * Cross referenced back to the vtable and counted manually (SetUserCvar is 1 higher, offsets start from 1)
			 */
			"SetUserCvar"
			{
				"windows64"	"30"
			}
			/**
			 * CBaseClient::SetName(char  const*);
			 * Linux offset straight from VTable dump.
			 * Has string "(%d)%-0.*s"
			 */
			"SetClientName"
			{
				"windows64"	"31"
			}
			/**
			 * 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+0B0h], 0
			 * Win:		mov     byte ptr [esi+0B0h], 0
			 *
			 * L4D2: This has been moved into CBaseClient::UpdateUserSettings(), rest of the details are still relevant.
			 */
			"InfoChanged"
			{
				"windows64"	"416"
			}
		}
	}

	"#default"
	{
		"Signatures"
		{
			/**
			 *	CNetworkStringTableContainer::WriteBaselines
			 *	"Index error writing string table baseline %s\n"
			 */
			"WriteBaselines"
			{
				"library"	"engine"
				"windows64"	"\x48\x8B\xC4\x44\x89\x48\x20\x48\x81\xEC\xE8\x00\x00\x00"
			}
		}
	}
	
	"#default"
	{
		"Offsets"
		{
			"SetOwnerEntity"
			{
				"windows64"	"22"
				"linux64"	"23"
			}
			/* CTerrorPlayer::GiveNamedItem(char const*, int, bool, CBaseEntity*) */
			"GiveNamedItem"
			{
				"windows64"	"490"
				"linux64"	"491"
			}
			"RemovePlayerItem"
			{
				"windows64"	"325"
				"linux64"	"326"
			}
			"Weapon_GetSlot"
			{
				"windows64"	"318"
				"linux64"	"319"
			}
			"Ignite"
			{
				"windows64"	"249"
				"linux64"	"250"
			}
			"Extinguish"
			{
				"windows64"	"252"
				"linux64"	"253"
			}
			"Teleport"
			{
				"windows64"	"134"
				"linux64"	"135"
			}
			"CommitSuicide"
			{
				"windows64"	"548"
				"linux64"	"548"
			}
			"GetVelocity"
			{
				"windows64"	"162"
				"linux64"	"163"
			}
			"EyeAngles"
			{
				"windows64"	"151"
				"linux64"	"152"
			}
			"AcceptInput"
			{
				"windows64"	"50"
				"linux64"	"51"
			}
			"SetEntityModel"
			{
				"windows64"	"31"
				"linux64"	"32"
			}
			"WeaponEquip"
			{
				"windows64"	"311"
				"linux64"	"312"
			}
			"Activate"
			{
				"windows64"	"42"
				"linux64"	"43"
			}
			"PlayerRunCmd"
			{
				"windows64"	"515"
				"linux64"	"516"
			}
			"GiveAmmo"
			{
				"windows64"	"304"
				"linux64"	"305"
			}
			"GetAttachment"
			{
				"windows64"	"243"
				"linux64"	"244"
			}
		}
		
		"Keys"
		{
			"GameRulesProxy"		"CTerrorGameRulesProxy"
			"GameRulesDataTable"	"terror_gamerules_data"
		}
	}
}
