Common Objects

Commonly used objects and their public members

IPlayer

Namespace: Fragsurf.Shared.Player

The Player interface used for accessing information about a player.

IPlayer
    int ClientIndex
    ulong SteamID
    string DisplayName
    HumanControllable Human
    bool Introduced
    byte Team
    int Latency
    bool IsFake
    bool Disconnected



HumanControllable

Namespace: Fragsurf.Shared.Entity

The entity that is controlled by a player

HumanControllable
    IPlayer Player
    HandItem EquippedItem
    bool IsLocalOwner
    bool IsLocalFake
    bool Ducked
    MoveData MoveData
    Vector3 EyeOrigin
    Backpack Backpack
    Vector3 Viewpunch
    Vector3 Aimpunch
    Vector3 Forward
    Vector3 Right
    Vector3 Up
    void Damage(int amount)
    void Damage(DamageInfo damageInfo)
    void Revive(byte teamNumber = 1)
    int HammerVelocity()
    void Slay()
    void SetAngles(Vector3 newAngles)
    Ray GetEyeRay()



MoveData

Namespace: Fragsurf.Movement

Contains information related to the player's movement

MoveData
    Vector3 Origin
    Vector3 PreviousOrigin
    Vector3 ViewAngles
    Vector3 Velocity
    Vector3 BaseVelocity
    Vector3 LadderNormal
    Vector3 PreGroundedVelocity
    MoveStyle Style
    int Buttons
    int OldButtons
    float ForwardMove
    float SideMove
    float UpMove
    float SurfaceFriction
    float GravityFactor
    float WalkFactor
    bool Ducked
    bool Momentum
    bool JustJumped
    bool JustGrounded
    bool Surfing
    Vector3 SurfNormal
    bool Sliding
    float WaterDepth
    float WaterJumpTime
    string FilterName



MoveType

Namespace: Fragsurf.Movement

Movement style enum

MoveStyle
    FW
    HSW
    SW
    BWHSW
    BW



DamageInfo

Namespace: Fragsurf.Shared.Entity

Contains information about damage being dealt to a player

DamageInfo
    int WeaponId
    int AttackerHumanId
    int VictimHumanId
    int Amount
    bool ResultedInDeath
    Vector3 HitPoint
    Vector3 HitNormal
    float Viewpunch
    HitboxArea HitArea



InputButtons

Namespace: Fragsurf.Movement

The enum used to define what buttons the player is pressing

InputButtons
    None = 0
    Jump = 1 << 1
    Duck = 1 << 2
    Speed = 1 << 3
    MoveLeft = 1 << 4
    MoveRight = 1 << 5
    MoveForward = 1 << 6
    MoveBack = 1 << 7
    MoveUp = 1 << 8
    HandAction = 1 << 9
    HandAction2 = 1 << 10
    Interact = 1 << 11
    Slot1 = 1 << 12
    Slot2 = 1 << 13
    Slot3 = 1 << 14
    Slot4 = 1 << 15
    Slot5 = 1 << 16
    Drop = 1 << 17
    Reload = 1 << 18
    NextItem = 1 << 19
    PrevItem = 1 << 20
    Brake = 1 << 21



FSMActor

Namespace Fragsurf.FSM.Actors

These are objects placed throughout the map that tie in with gameplay.

FSMActor
    string TargetName
    ActorField[] Fields
    void DestroyColliders()
    void SetDrawState(bool draw)



FSMTrigger

Namespace: Fragsurf.FSM.Actors

Derives from: FSMActor

FSMTrigger handles players entering and exiting triggers

FSMTrigger
    FilterType Filter
    string TestFilterName
    float MinSpeed
    float MaxSpeed
    FSMTriggerCondition TriggerCondition



PlayerRun

Contains a player's speedrun data

PlayerRun
    int Checkpoint
    int BonusNumber
    ulong SteamId
    SpeedrunState State
    float RoughTime
    int JumpCount
    int StrafeCount
    int CurrentSync



SpeedrunState

Enum state of a player's speedrun

SpeedrunState
    None,
    InStartZone,
    Live,
    Finished



TouchInfo

Struct containing Tricksurf trigger touch data

TouchInfo
    int Tick
    FSMTrigger Trigger
    int TriggerId
    bool Admissible
    float Time
    Vector3 Velocity
    MoveStyle Style
    bool InvalidStart



TrickCompletion

Struct containing Tricksurf completion data

TrickCompletion
    int CompletionId
    int ClientIndex
    int TrickId
    string TrickName
    int Points
    int AverageVelocity
    float CompletionTime
    MoveStyle Style
    List<TouchInfo> Touches
    int StartTick
    int EndTick