// SourceOP Function Offsets
//
//
// This file sets offsets for certain functions used by SourceOP.
// Don't modify this file unless you know what you are doing.
//
// These offsets are for Linux, the Windows offsets are automatically
// calculated based on these values. Offsets with "_from_" in them are not
// modified for any platform as they are offsets from something else, not from
// the base class.
//
// The game directory is specified at the top of each block. The block called
// "default" MUST BE FIRST and will be used as the offsets if none are
// specified for the particular game type. Any offsets not specified in a
// game's specific block will get its values from the default block.
//
// Currently, default applies to hl2mp, css, and dods.


// The default block must be first
default
{
	CBaseEntity::GetCollideable =				4
	CBaseEntity::GetNetworkable =				5
	CBaseEntity::GetModelIndex =				7
	CBaseEntity::GetModelName =				8
	CBaseEntity::SetModelIndex =				9
	CBaseEntity::GetClassName =				12
	CBaseEntity::UpdateTransmitState =			21
	CBaseEntity::Spawn =					24
	CBaseEntity::SetModel =					26
	CBaseEntity::KeyValue_lin =				30
	CBaseEntity::KeyValue_win =				31
	CBaseEntity::Activate =					33
	CBaseEntity::SetParent =				34
	CBaseEntity::AcceptInput =				36
	CBaseEntity::Think =					47
	CBaseEntity::PassesDamageFilter =			58
	CBaseEntity::TraceAttack =				59
	CBaseEntity::OnTakeDamage =				61
	CBaseEntity::Event_Killed =				63
	CBaseEntity::IsPlayer =					76
	CBaseEntity::ChangeTeam =				82
	CBaseEntity::Use = 					88
	CBaseEntity::StartTouch =				89
	CBaseEntity::Touch =					90
	CBaseEntity::UpdateOnRemove =				96
	CBaseEntity::Teleport =					99
	CBaseEntity::FireBullets =				102
	CBaseEntity::SetDamage =				117
	CBaseEntity::EyePosition =				118
	CBaseEntity::EyeAngles =				119
	CBaseEntity::FVisible_lin =				128
	CBaseEntity::FVisible_win =				128
	CBaseEntity::WorldSpaceCenter =				138
	CBaseEntity::GetSoundEmissionOrigin =			139
	CBaseEntity::VPhysicsGetObjectList =			150
	CBaseAnimating::StudioFrameAdvance =			174
	CBaseCombatCharacter::GiveAmmo =			214
	CBaseGrenade::SetDamageRadius =				271
	CBasePlayer::StartObserverMode =			301
	CBasePlayer::StopObserverMode =				302

	// These offsets are used to find m_vecAbsOrigin and will probably
	// be fine for most mods
	m_vecAbsOrigin_from_m_iTextureFrameIndex =		-24
	m_vecAbsOrigin_from_m_flElasticity =			20
	m_vecAbsOrigin_from_m_vecVelocity =			-12
	
	m_vecAbsVelocity_from_m_iTeamNum =			36
	m_vecAbsVelocity_from_m_flElasticity =			-84

	m_vecAngVelocity_from_m_vecAbsVelocity =		12

	m_flGravity_from_m_flFriction = 			-4

	m_ModelName_from_m_vecBaseVelocity =			-4

	m_iClassname_from_CBaseEntity_win =			12
	m_iClassname_from_CBaseEntity_lin =			20

	m_pPhysicsObject_from_m_CollisionGroup =		4

	//sizeof(CCollisionProperty)
	m_Network_from_m_Collision =				92
	//-sizeof(CServerNetworkProperty)
	m_Network_from_m_hOwnerEntity =				-164

	m_takedamage_from_m_lifeState =				1

	m_fnCommandCallback_from_ConCommand =			24
	CEntityDictionary_from_dumpentityfactories =		20
	CEntityDictionary_use_oldstyle =			0
	CEntityDictionary_use_debugprints =			0

	// used if not found automatically
	m_MoveType_from_CBaseEntity_fallback_win =		0
	m_MoveCollide_from_CBaseEntity_fallback_win =		0
	m_MoveType_from_CBaseEntity_fallback_lin =		0
	m_MoveCollide_from_CBaseEntity_fallback_lin =		0
	m_nSolidType_from_CollisionProp_fallback =		0
	m_nSolidType_use_integer =				0
	m_usSolidFlags_from_CCollisionProp_fallback =		0
}

cstrike
{
	CBasePlayer::StartObserverMode =			302
	CBasePlayer::StopObserverMode =				303
}

gmod9
{
	CBaseEntity::GetClassName =				14
	CBaseEntity::UpdateTransmitState =			23
	CBaseEntity::Spawn =					26
	CBaseEntity::SetModel =					28
	CBaseEntity::KeyValue_lin =				31
	CBaseEntity::KeyValue_win =				32
	CBaseEntity::Activate =					35
	// gmod9 doesn't have a setparent vfunc. oh well :/
	CBaseEntity::SetParent =				-1
	CBaseEntity::AcceptInput =				37
	CBaseEntity::Think =					48
	CBaseEntity::PassesDamageFilter =			55
	CBaseEntity::TraceAttack =				56
	CBaseEntity::OnTakeDamage =				57
	CBaseEntity::Event_Killed =				59
	CBaseEntity::IsPlayer =					71
	CBaseEntity::ChangeTeam =				78
	CBaseEntity::Use = 					84
	CBaseEntity::StartTouch =				85
	CBaseEntity::Touch =					86
	CBaseEntity::UpdateOnRemove =				92
	CBaseEntity::Teleport =					94
	CBaseEntity::FireBullets =				97
	CBaseEntity::EyePosition =				109
	CBaseEntity::EyeAngles =				110
	CBaseEntity::FVisible_lin =				119
	CBaseEntity::FVisible_win =				119
	CBaseEntity::WorldSpaceCenter =				129
	CBaseEntity::GetSoundEmissionOrigin =			130
	CBaseEntity::VPhysicsGetObjectList =			141
	CBaseAnimating::StudioFrameAdvance =			159

	m_Network_from_m_Collision =				100
	m_Network_from_m_hOwnerEntity =				-172

	CEntityDictionary_use_oldstyle =			1

	// used if not found automatically
	m_MoveType_from_CBaseEntity_fallback_win =		540
	m_MoveCollide_from_CBaseEntity_fallback_win =		541
	m_MoveType_from_CBaseEntity_fallback_lin =		560
	m_MoveCollide_from_CBaseEntity_fallback_lin =		561
	m_nSolidType_from_CollisionProp_fallback =		32
	m_nSolidType_use_integer =				1
	m_usSolidFlags_from_CCollisionProp_fallback =		36
}

FortressForever
{
	CBaseEntity::UpdateTransmitState =			23
	CBaseEntity::Spawn =					26
	CBaseEntity::SetModel =					28
	CBaseEntity::SetModel_win =				28
	CBaseEntity::KeyValue_lin =				34
	CBaseEntity::KeyValue_win =				35
	CBaseEntity::Activate =					37
	CBaseEntity::SetParent =				38
	CBaseEntity::AcceptInput =				40
	CBaseEntity::Think =					52
	CBaseEntity::PassesDamageFilter =			63
	CBaseEntity::TraceAttack =				64
	CBaseEntity::OnTakeDamage =				66
	CBaseEntity::Event_Killed =				68
	CBaseEntity::IsPlayer =					82
	CBaseEntity::ChangeTeam =				88
	CBaseEntity::Use = 					94
	CBaseEntity::StartTouch =				95
	CBaseEntity::Touch =					96
	CBaseEntity::UpdateOnRemove =				102
	CBaseEntity::Teleport =					105
	CBaseEntity::FireBullets =				108
	CBaseEntity::SetDamage =				127
	CBaseEntity::EyePosition =				128
	CBaseEntity::EyeAngles =				129
	CBaseEntity::FVisible_lin =				138
	CBaseEntity::FVisible_win =				138
	CBaseEntity::WorldSpaceCenter =				148
	CBaseEntity::GetSoundEmissionOrigin =			149
	CBaseEntity::VPhysicsGetObjectList =			160
	CBaseAnimating::StudioFrameAdvance =			184
	CBaseCombatCharacter::GiveAmmo =			224
	CBaseGrenade::SetDamageRadius =				210
	CBasePlayer::StartObserverMode =			311
	CBasePlayer::StopObserverMode =				312

	m_iClassname_from_CBaseEntity_win =			32
	m_iClassname_from_CBaseEntity_lin =			40
}

dystopia_v1
{
	CBaseEntity::KeyValue =		29
	CBaseEntity::Think =		46
	CBaseEntity::Use = 		82
	CBaseEntity::StartTouch =	83
	CBaseEntity::Touch =		84
	CBaseEntity::UpdateOnRemove =	90
	CBaseEntity::Teleport =		92
	CBaseEntity::EyePosition =	107
}
