// 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 =                       86
        CBaseEntity::ChangeTeam =                               91
        CBaseEntity::Use =                                      97
        CBaseEntity::StartTouch =                               98
        CBaseEntity::Touch =                                    99
        CBaseEntity::UpdateOnRemove =                           105
        CBaseEntity::Teleport =                                 108
        CBaseEntity::FireBullets =                              112
        CBaseEntity::SetDamage =                                129
        CBaseEntity::EyePosition =                              130
        CBaseEntity::EyeAngles =                                131
        CBaseEntity::FVisible_lin =                             141
        CBaseEntity::FVisible_win =                             141
        CBaseEntity::WorldSpaceCenter =                         149
        CBaseEntity::GetSoundEmissionOrigin =                   150
        CBaseEntity::CreateVPhysics =                           154
        CBaseEntity::VPhysicsDestroyObject =                    156
        CBaseEntity::VPhysicsGetObjectList =                    164
        CBaseAnimating::StudioFrameAdvance =                    189
        CBaseAnimating::Extinguish =                            212
        CBaseCombatCharacter::GiveAmmo =                        251
        CBaseCombatCharacter::Weapon_Equip =                    260
        CBaseCombatCharacter::Weapon_Switch =                   263
        CBaseCombatCharacter::Weapon_GetSlot =                  267
        CBaseCombatCharacter::RemovePlayerItem =                269
        CBaseCombatWeapon::Holster_win =                        250
        // find via CBasePlayer::StartObserverMode
        CBaseCombatWeapon::Holster_lin =                        256
        CBaseGrenade::SetDamageRadius =                         222

        CBaseCombatWeapon::PrimaryAttack_win =                  274
        CBaseCombatWeapon::SecondaryAttack_win =                275
        CBaseCombatWeapon::PrimaryAttack_lin =                  280
        CBaseCombatWeapon::SecondaryAttack_lin =                281
        CBasePlayer::ForceRespawn =                             324
        CBasePlayer::StartObserverMode =                        368
        CBasePlayer::StopObserverMode =                         369
        CBasePlayer::ItemPostFrame =                            398
        CBasePlayer::GiveNamedItem =                            399
        CBasePlayer::CanHearAndReadChatFrom =                   419
        CBaseMultiplayerPlayer::CalculateTeamBalanceScore =     462
        CTFPlayer::GiveNamedItem_win =                          468
        CTFPlayer::GiveNamedItem_lin =                          476

        CGameRules::PlayerRelationship =                        107
        CGameRules::PlayerCanHearChat =                         108
        CGameRules::GetTeamIndex =                              110
        CGameRules::GetIndexedTeamName =                        111
        CGameRules::IsValidTeam =                               112
        CGameRules::MarkAchievement =                           128
        CMultiplayRules::GetNextLevelName =                     144
        CMultiplayRules::ChangeLevel =                          146
        CMultiplayRules::GoToIntermission =                     147
        CTeamplayRules::SetStalemate =                          156
        CTeamplayRules::SetSwitchTeams =                        157
        CTeamplayRules::HandleSwitchTeams =                     159
        CTeamplayRules::SetScrambleTeams =                      160
        CTeamplayRules::HandleScrambleTeams =                   162

        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 =                     -42

        // 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 =                        367
        CBasePlayer::StopObserverMode =                         368
        CBasePlayer::ItemPostFrame =                            397
        CBasePlayer::GiveNamedItem =                            398
        CBasePlayer::CanHearAndReadChatFrom =                   418
        CBaseMultiplayerPlayer::CalculateTeamBalanceScore =     461
}

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 =     460
}
