Class PathTrack
Namespace: ValveResourceFormat.Renderer.Entities
Assembly: Renderer.dll
path_track, Source's CPathTrack. A node of the track a runs along, linked to the next one by target and optionally branching to an altpath.
public class PathTrack : BaseEntityInheritance
object ← BaseEntity ← PathTrack
Inherited Members
BaseEntity.Scene, BaseEntity.RootNode, BaseEntity.Transform, BaseEntity.RigidTransform, BaseEntity.LayerName, BaseEntity.EntitySystem, BaseEntity.Data, BaseEntity.SpawnData, BaseEntity.NameFixup, BaseEntity.KeyValues, BaseEntity.Classname, BaseEntity.TargetName, BaseEntity.SpawnFlags, BaseEntity.SpawnTransform, BaseEntity.Owner, BaseEntity.MoveParent, BaseEntity.EntityScale, BaseEntity.ModelName, BaseEntity.Origin, BaseEntity.Angles, BaseEntity.WorldOrigin, BaseEntity.WorldAngles, BaseEntity.Velocity, BaseEntity.AngularVelocity, BaseEntity.NextThink, BaseEntity.MoveDoneTime, BaseEntity.IsRemoved, BaseEntity.Collider, BaseEntity.IsSolid, BaseEntity.IsTrigger, BaseEntity.IsDrawn, BaseEntity.IsCollidable, BaseEntity.TouchingEntities, BaseEntity.CreateRootNode(), BaseEntity.CreateEditorNode(ObjectTypeFlags), BaseEntity.CreateEffect(string?, ParticleSnapshot?, bool), BaseEntity.HasSpawnFlags<TSpawnFlags>(TSpawnFlags), BaseEntity.Spawn(), BaseEntity.Activate(), BaseEntity.Think(), BaseEntity.RoundStart(), BaseEntity.MoveDone(), BaseEntity.TryGetTouchBounds(out Vector3, out Vector3), BaseEntity.AcceptsTouchFrom(BaseEntity), BaseEntity.OnStartTouch(BaseEntity), BaseEntity.OnTouch(BaseEntity), BaseEntity.OnEndTouch(BaseEntity), BaseEntity.ObjectCaps, BaseEntity.Use(BaseEntity?), BaseEntity.Teleport(Vector3, Vector3?), BaseEntity.JumpTo(Vector3, Vector3), BaseEntity.AcceptInput(string, EntityInputData), BaseEntity.InputKill(EntityInputData), BaseEntity.InputFireUser1(EntityInputData), BaseEntity.InputFireUser2(EntityInputData), BaseEntity.InputFireUser3(EntityInputData), BaseEntity.InputFireUser4(EntityInputData), BaseEntity.SetNextThink(float), BaseEntity.SetMoveDoneTime(float), BaseEntity.PhysicsSimulate(float), BaseEntity.TurnsByAngleComponents, BaseEntity.IsPusher, BaseEntity.IsUnblockableByPlayer, BaseEntity.MovesWithoutPushing, BaseEntity.PushesPlayerAsTrain, BaseEntity.HasVPhysicsSolid, BaseEntity.OnStartBlocked(BaseEntity), BaseEntity.OnBlocked(BaseEntity), BaseEntity.OnEndBlocked(), BaseEntity.GetSurfaceVelocity(Vector3), BaseEntity.TurnBody(Vector3, Vector3), BaseEntity.SetOriginAndAngles(Vector3, Vector3), BaseEntity.SetWorldOriginAndAngles(Vector3, Vector3), BaseEntity.AddNode(SceneNode, bool), BaseEntity.OnRemove(), BaseEntity.UpdateTransform(), BaseEntity.UpdateColliderTransform(), BaseEntity.UpdateRenderTransform(float), BaseEntity.SnapInterpolation(), BaseEntity.AngleMod(float)
Constructors
PathTrack(EntitySystem, EntitySpawnInfo)
Initializes a path_track from its keyvalues.
public PathTrack(EntitySystem system, EntitySpawnInfo spawnInfo)Parameters
system EntitySystem
spawnInfo EntitySpawnInfo
Properties
IsEnabled
Gets whether a train looking ahead with move set can pass this node.
public bool IsEnabled { get; }Property Value
OrientationType
Gets how a train orients itself at this node.
public PathTrack.Orientation OrientationType { get; }Property Value
Speed
Gets the speed a train takes on passing this node, or 0 to keep its own.
public float Speed { get; }Property Value
Methods
Activate()
Called once every entity in the map has spawned, for anything that needs to resolve other entities by name. Source's Activate.
public override void Activate()Remarks
Only a node with a name links itself, and only forward: the link back is made by the node before it.
GetNext()
Gets the node after this one, the alternate path while it is enabled going forward.
public PathTrack? GetNext()Returns
GetNextInDir(bool)
Gets going forward, otherwise .
public PathTrack? GetNextInDir(bool forward)Parameters
forward bool
Returns
GetOrientation(bool)
Gets the angles a train has at this node: the node's own angles for , otherwise the direction of the path from this node, or into it at the end of the path.
public Vector3 GetOrientation(bool forward)Parameters
forward bool
Returns
GetPrevious()
Gets the node before this one, the alternate path while it is enabled going backward.
public PathTrack? GetPrevious()Returns
InputDisableAlternatePath(EntityInputData)
Sends trains down the main path.
[EntityInput("DisableAlternatePath")]
protected void InputDisableAlternatePath(EntityInputData data)Parameters
data EntityInputData
InputDisablePath(EntityInputData)
Stops trains passing.
[EntityInput("DisablePath")]
protected void InputDisablePath(EntityInputData data)Parameters
data EntityInputData
InputEnableAlternatePath(EntityInputData)
Sends trains down the alternate path, when there is one.
[EntityInput("EnableAlternatePath")]
protected void InputEnableAlternatePath(EntityInputData data)Parameters
data EntityInputData
InputEnablePath(EntityInputData)
Lets trains pass.
[EntityInput("EnablePath")]
protected void InputEnablePath(EntityInputData data)Parameters
data EntityInputData
InputInPass(EntityInputData)
Fires OnPass, as a train passing does.
[EntityInput("InPass")]
protected void InputInPass(EntityInputData data)Parameters
data EntityInputData
InputToggleAlternatePath(EntityInputData)
Toggles which path trains take, when there is an alternate one.
[EntityInput("ToggleAlternatePath")]
protected void InputToggleAlternatePath(EntityInputData data)Parameters
data EntityInputData
InputTogglePath(EntityInputData)
Toggles whether trains can pass.
[EntityInput("TogglePath")]
protected void InputTogglePath(EntityInputData data)Parameters
data EntityInputData
LookAhead(ref Vector3, float, bool, out PathTrack?)
Walks the path from this node, starting at origin, for |dist| units, forward for a positive distance and backward for a negative one.
public PathTrack? LookAhead(ref Vector3 origin, float dist, bool move, out PathTrack? nextNext)Parameters
origin Vector3
Where to start, in the move parent frame; receives the point reached.
dist float
The signed distance to walk.
move bool
Whether disabled nodes stop the walk. Without it, running off the end of the path carries on in a straight line past the last node.
nextNext PathTrack?
Receives the node after the returned one.
Returns
The last node passed, the one behind the point reached, or null at the end of the path.
Spawn()
Sets up the entity: loads its model, reads class-specific keyvalues, and schedules its first think. Called by right after construction, before the entity enters the world.
public override void Spawn()ValidPath(PathTrack?, bool)
Gets node, or null when there is none or testFlag is set and it is disabled.
public static PathTrack? ValidPath(PathTrack? node, bool testFlag)Parameters
node PathTrack?
testFlag bool

