// 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::GetRefEHandle =                            3
        CBaseEntity::GetCollideable =                           4
        CBaseEntity::GetNetworkable =                           5
        CBaseEntity::GetModelIndex =                            7
        CBaseEntity::GetModelName =                             8
        CBaseEntity::SetModelIndex =                            9
        CBaseEntity::GetDataDescMap =                           12
        CBaseEntity::GetClassName =                             -1
        CBaseEntity::UpdateTransmitState =                      20
        CBaseEntity::Spawn =                                    23
        CBaseEntity::Precache =                                 24
        CBaseEntity::SetModel =                                 25
        CBaseEntity::PostConstructor =                          27
        CBaseEntity::KeyValue_lin =                             30
        CBaseEntity::KeyValue_win =                             31
        CBaseEntity::Activate =                                 34
        CBaseEntity::SetParent =                                35
        CBaseEntity::AcceptInput =                              37
        CBaseEntity::Think =                                    48
        CBaseEntity::PassesDamageFilter =                       60
        CBaseEntity::TraceAttack =                              61
        CBaseEntity::OnTakeDamage =                             63
        CBaseEntity::IsAlive =                                  66
        CBaseEntity::Event_Killed =                             67
        CBaseEntity::IsNPC =                                    71
        CBaseEntity::IsPlayer =                                 81
        CBaseEntity::IsBaseCombatWeapon =                       87
        CBaseEntity::ChangeTeam =                               92
        CBaseEntity::Use =                                      98
        CBaseEntity::StartTouch =                               99
        CBaseEntity::Touch =                                    100
        CBaseEntity::UpdateOnRemove =                           106
        CBaseEntity::Teleport =                                 109
        CBaseEntity::FireBullets =                              113
        CBaseEntity::SetDamage =                                130
        CBaseEntity::EyePosition =                              131
        CBaseEntity::EyeAngles =                                132
        CBaseEntity::FVisible_lin =                             142
        CBaseEntity::FVisible_win =                             142
        CBaseEntity::WorldSpaceCenter =                         150
        CBaseEntity::GetSoundEmissionOrigin =                   151
        CBaseEntity::CreateVPhysics =                           155
        CBaseEntity::VPhysicsDestroyObject =                    157
        CBaseEntity::VPhysicsGetObjectList =                    165
        CBaseAnimating::StudioFrameAdvance =                    193
        CBaseAnimating::Extinguish =                            216
        CBaseCombatCharacter::GiveAmmo =                        255
        CBaseCombatCharacter::Weapon_Equip =                    264
        CBaseCombatCharacter::Weapon_Switch =                   267
        CBaseCombatCharacter::Weapon_GetSlot =                  271
        CBaseCombatCharacter::RemovePlayerItem =                273
        CBaseCombatWeapon::Holster_win =                        254
        // find via CBasePlayer::StartObserverMode
        CBaseCombatWeapon::Holster_lin =                        260
        CBaseGrenade::SetDamageRadius =                         234

        CBaseCombatWeapon::PrimaryAttack_win =                  278
        CBaseCombatWeapon::SecondaryAttack_win =                279
        CBaseCombatWeapon::PrimaryAttack_lin =                  284
        CBaseCombatWeapon::SecondaryAttack_lin =                285
        CBasePlayer::ForceRespawn =                             329
        CBasePlayer::StartObserverMode =                        373
        CBasePlayer::StopObserverMode =                         374
        CBasePlayer::ItemPostFrame =                            403
        CBasePlayer::GiveNamedItem =                            404
        CBasePlayer::CanHearAndReadChatFrom =                   424
        CBaseMultiplayerPlayer::CalculateTeamBalanceScore =     468
        CTFPlayer::GiveNamedItem_win =                          474
        CTFPlayer::GiveNamedItem_lin =                          481

        CGameRules::PlayerRelationship =                        109
        CGameRules::PlayerCanHearChat =                         110
        CGameRules::GetTeamIndex =                              112
        CGameRules::GetIndexedTeamName =                        113
        CGameRules::IsValidTeam =                               114
        CGameRules::MarkAchievement =                           130
        CMultiplayRules::GetNextLevelName =                     147
        CMultiplayRules::ChangeLevel =                          151
        CMultiplayRules::GoToIntermission =                     152
        CTeamplayRules::SetStalemate =                          162
        CTeamplayRules::SetSwitchTeams =                        163
        CTeamplayRules::HandleSwitchTeams =                     165
        CTeamplayRules::SetScrambleTeams =                      166
        CTeamplayRules::HandleScrambleTeams =                   168

        IServerNetworkable::GetEntityHandle_platind =           0
        IServerNetworkable::GetEdict_platind =                  2
        IServerNetworkable::Release_platind =                   4
        IServerNetworkable::GetBaseEntity_platind =             7

        // CBaseClient Windows
        CBaseClient::Connect_win =                              10
        CBaseClient::Reconnect_win =                            12
        CBaseClient::Disconnect_win =                           13
        CBaseClient::GetPlayerSlot_win =                        14
        CBaseClient::GetNetworkID_win =                         16
        CBaseClient::GetClientName_win =                        17
        CBaseClient::GetNetChannel_win =                        18
        CBaseClient::GetServer_win =                            19
        CBaseClient::ExecuteStringCommand_win =                 28
        // ----
        CBaseClient::FillUserInfo_win =                         7
        CBaseClient::SendServerInfo_win =                       13
        CBaseClient::SetUserCVar_win =                          18
        // ----
        CBaseClient::vtable2_from_vtable3 =                     22

        // CBaseClient Linux
        CBaseClient::Connect_lin =                              11
        CBaseClient::Reconnect_lin =                            13
        CBaseClient::Disconnect_lin =                           14
        CBaseClient::IGetPlayerSlot_lin =                       15
        CBaseClient::GetPlayerSlot_lin =                        3
        CBaseClient::GetNetworkID_lin =                         5
        CBaseClient::GetClientName_lin =                        6
        CBaseClient::GetNetChannel_lin =                        7
        CBaseClient::GetServer_lin =                            8
        CBaseClient::ExecuteStringCommand_lin =                 22
        // ----
        CBaseClient::FillUserInfo_lin =                         47
        CBaseClient::SendServerInfo_lin =                       53
        CBaseClient::SetUserCVar_lin =                          58

        // CBaseServer platform independent
        CBaseServer::GetNumClients =                            3
        CBaseServer::GetMaxClients =                            6
        CBaseServer::RejectConnection =                         48
        CBaseServer::ConnectClient =                            50
        CBaseServer::GetFreeClient =                            51

        m_fnCommandCallback_from_ConCommand =                   24
        CEntityDictionary_from_dumpentityfactories =            29
        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 =                        366
        CBasePlayer::StopObserverMode =                         367
        CBasePlayer::ItemPostFrame =                            396
        CBasePlayer::GiveNamedItem =                            397
        CBasePlayer::CanHearAndReadChatFrom =                   417
        CBaseMultiplayerPlayer::CalculateTeamBalanceScore =     460
}

hl2mp
{
        CBaseCombatWeapon::Holster_win =                        247
        CBaseCombatWeapon::Holster_lin =                        248

        CBaseCombatWeapon::PrimaryAttack_win =                  271
        CBaseCombatWeapon::SecondaryAttack_win =                272
        CBaseCombatWeapon::PrimaryAttack_lin =                  272
        CBaseCombatWeapon::SecondaryAttack_lin =                273

        CBaseMultiplayerPlayer::CalculateTeamBalanceScore =     459
}
