// 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::VPhysicsGetObjectList =                    164
        CBaseAnimating::StudioFrameAdvance =                    189
        CBaseAnimating::Extinguish =                            211
        CBaseCombatCharacter::GiveAmmo =                        250
        CBaseCombatCharacter::Weapon_Equip =                    257
        CBaseCombatCharacter::Weapon_Switch =                   260
        CBaseCombatCharacter::Weapon_GetSlot =                  264
        CBaseCombatCharacter::RemovePlayerItem =                266
        CBaseCombatWeapon::Holster_win =                        249
        // find via CBasePlayer::StartObserverMode
        CBaseCombatWeapon::Holster_lin =                        255
        CBaseGrenade::SetDamageRadius =                         221

        CBaseCombatWeapon::PrimaryAttack_win =                  273
        CBaseCombatWeapon::SecondaryAttack_win =                274
        CBaseCombatWeapon::PrimaryAttack_lin =                  279
        CBaseCombatWeapon::SecondaryAttack_lin =                280
        CBasePlayer::ForceRespawn =                             321
        CBasePlayer::StartObserverMode =                        363
        CBasePlayer::StopObserverMode =                         364
        CBasePlayer::ItemPostFrame =                            393
        CBasePlayer::GiveNamedItem =                            394
        CBasePlayer::CanHearAndReadChatFrom =                   414
        CBaseMultiplayerPlayer::CalculateTeamBalanceScore =     457
        CTFPlayer::GiveNamedItem_win =                          463
        CTFPlayer::GiveNamedItem_lin =                          471

        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 =                        362
        CBasePlayer::StopObserverMode =                         363
        CBasePlayer::ItemPostFrame =                            392
        CBasePlayer::GiveNamedItem =                            393
        CBasePlayer::CanHearAndReadChatFrom =                   413
        CBaseMultiplayerPlayer::CalculateTeamBalanceScore =     456
}

hl2mp
{
        CBaseEntity::UpdateTransmitState =                      19
        CBaseEntity::Spawn =                                    22
        CBaseEntity::Precache =                                 23
        CBaseEntity::SetModel =                                 24
        CBaseEntity::PostConstructor =                          26
        CBaseEntity::KeyValue_lin =                             29
        CBaseEntity::KeyValue_win =                             30
        CBaseEntity::Activate =                                 33
        CBaseEntity::SetParent =                                34
        CBaseEntity::AcceptInput =                              36
        CBaseEntity::Think =                                    47
        CBaseEntity::PassesDamageFilter =                       59
        CBaseEntity::TraceAttack =                              60
        CBaseEntity::OnTakeDamage =                             62
        CBaseEntity::IsAlive =                                  65
        CBaseEntity::Event_Killed =                             66
        CBaseEntity::IsNPC =                                    70
        CBaseEntity::IsPlayer =                                 80
        CBaseEntity::IsBaseCombatWeapon =                       85
        CBaseEntity::ChangeTeam =                               90
        CBaseEntity::Use =                                      96
        CBaseEntity::StartTouch =                               97
        CBaseEntity::Touch =                                    98
        CBaseEntity::UpdateOnRemove =                           104
        CBaseEntity::Teleport =                                 107
        CBaseEntity::FireBullets =                              111
        CBaseEntity::SetDamage =                                128
        CBaseEntity::EyePosition =                              129
        CBaseEntity::EyeAngles =                                130
        CBaseEntity::FVisible_lin =                             140
        CBaseEntity::FVisible_win =                             140
        CBaseEntity::WorldSpaceCenter =                         148
        CBaseEntity::GetSoundEmissionOrigin =                   149
        CBaseEntity::VPhysicsGetObjectList =                    163
        CBaseAnimating::StudioFrameAdvance =                    188
        CBaseAnimating::Extinguish =                            210
        CBaseCombatCharacter::GiveAmmo =                        249
        CBaseCombatCharacter::Weapon_Equip =                    256
        CBaseCombatCharacter::Weapon_Switch =                   259
        CBaseCombatCharacter::Weapon_GetSlot =                  263
        CBaseCombatCharacter::RemovePlayerItem =                265

        CBaseCombatWeapon::Holster_win =                        245
        CBaseCombatWeapon::Holster_lin =                        246
        CBaseGrenade::SetDamageRadius =                         220

        CBaseCombatWeapon::PrimaryAttack_win =                  269
        CBaseCombatWeapon::SecondaryAttack_win =                270
        CBaseCombatWeapon::PrimaryAttack_lin =                  270
        CBaseCombatWeapon::SecondaryAttack_lin =                271

        CBasePlayer::ForceRespawn =                             320
        CBasePlayer::StartObserverMode =                        362
        CBasePlayer::StopObserverMode =                         363
        CBasePlayer::ItemPostFrame =                            392
        CBasePlayer::GiveNamedItem =                            393
        CBasePlayer::CanHearAndReadChatFrom =                   413
        CBaseMultiplayerPlayer::CalculateTeamBalanceScore =     454
}
