Class PropDoorRotating
Namespace: ValveResourceFormat.Renderer.Entities
Assembly: Renderer.dll
prop_door_rotating: a swinging model door. Swings away from whoever uses it unless opendir forces a side, can spawn open or ajar, and drives the other half of a double door. Breaking and the NPC blocker are not simulated. Alyx's prop_door_rotating_physics is the same thing, with the VR hand swing acting as a use press.
public class PropDoorRotating : BaseToggleInheritance
object ← BaseEntity ← BaseModelEntity ← BaseToggle ← PropDoorRotating
Inherited Members
BaseToggle.Speed, BaseToggle.Lip, BaseToggle.MoveDirection, BaseToggle.FinalDestination, BaseToggle.IsLinearMoving, BaseToggle.IsPusher, BaseToggle.TurnsByAngleComponents, BaseToggle.LinearMove(Vector3), BaseToggle.AngularMove(Vector3, float), BaseToggle.FinishLinearMove(), BaseToggle.GetAxisDirection(bool, bool), BaseToggle.ResolveEntitySpaceMoveDirection(), BaseToggle.GetTravelDistance(Vector3), BaseModelEntity.Solid, BaseModelEntity.ModelNode, BaseModelEntity.Physics, BaseModelEntity.LoadedModel, BaseModelEntity.NonEmpty(string?), BaseModelEntity.CreateRootNode(), BaseModelEntity.BuildsCollider, BaseModelEntity.InputColor(EntityInputData), BaseModelEntity.InputAlpha(EntityInputData), BaseModelEntity.InputSetRenderAttribute(EntityInputData), BaseModelEntity.InputClearRenderAttribute(EntityInputData), BaseModelEntity.InputLightingOrigin(EntityInputData), BaseModelEntity.DispatchInput(string, EntityInputData), BaseEntity.Scene, BaseEntity.RootNode, BaseEntity.Transform, BaseEntity.RigidTransform, BaseEntity.EntitySystem, BaseEntity.Data, BaseEntity.SpawnData, BaseEntity.NameFixup, BaseEntity.SpawnGroup, 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.IsShown, 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), BaseEntity.DispatchInput(string, EntityInputData)
Constructors
PropDoorRotating(EntitySystem, EntitySpawnInfo)
Initializes a prop_door_rotating from its keyvalues.
public PropDoorRotating(EntitySystem system, EntitySpawnInfo spawnInfo)Parameters
system EntitySystem
spawnInfo EntitySpawnInfo
Properties
Distance
Gets how far the door swings, in degrees.
public float Distance { get; }Property Value
float
IsLocked
Gets whether the door refuses to open.
public bool IsLocked { get; }Property Value
bool
Master
Gets the door of a double door this one follows, or null for one that leads or stands alone.
public PropDoorRotating? Master { get; }Property Value
ObjectCaps
Usable by default; only the ignore flag switches it off.
public override EntityCapability ObjectCaps { get; }Property Value
OpenDir
Gets which way the door may swing.
public PropDoorRotating.OpenDirection OpenDir { get; }Property Value
PropDoorRotating.OpenDirection
ReturnDelay
Gets the seconds the door stays open before closing, the returndelay keyvalue; -1 never closes.
public float ReturnDelay { get; }Property Value
float
State
Gets where the door is in its swing.
public PropDoorRotating.DoorState State { get; }Property Value
Methods
Activate()
Links a double door: a named door takes the other doors named by slavename (the name of this door when unset) as slaves. The slaves open and close with it.
public override void Activate()DispatchInput(string, EntityInputData)
Runs the handler declared with EntityInputAttribute for an input.
protected override bool DispatchInput(string inputName, EntityInputData data)Parameters
inputName string
data EntityInputData
Returns
bool
true when a handler ran.
InputClose(EntityInputData)
Closes the door, unless it is already shut.
[EntityInput("Close")]
protected void InputClose(EntityInputData data)Parameters
data EntityInputData
InputLock(EntityInputData)
Stops the door opening until it is unlocked.
[EntityInput("Lock")]
protected void InputLock(EntityInputData data)Parameters
data EntityInputData
InputOpen(EntityInputData)
Opens the door forward, unless it is locked or already open. A locked door says nothing.
[EntityInput("Open")]
protected void InputOpen(EntityInputData data)Parameters
data EntityInputData
InputOpenAwayFrom(EntityInputData)
Opens the door away from the entity the parameter names.
[EntityInput("OpenAwayFrom")]
protected void InputOpenAwayFrom(EntityInputData data)Parameters
data EntityInputData
InputOpenAwayFromActivator(EntityInputData)
Opens the door away from the activator, at the speed the parameter gives.
[EntityInput("OpenAwayFromActivator")]
protected void InputOpenAwayFromActivator(EntityInputData data)Parameters
data EntityInputData
InputPlayerClose(EntityInputData)
Presses the door as a player would, the same as PlayerOpen.
[EntityInput("PlayerClose")]
protected void InputPlayerClose(EntityInputData data)Parameters
data EntityInputData
InputPlayerOpen(EntityInputData)
Presses the door as a player would, unless it ignores player use.
[EntityInput("PlayerOpen")]
protected void InputPlayerOpen(EntityInputData data)Parameters
data EntityInputData
InputSetRotationDistance(EntityInputData)
Changes how far the door swings, from its next swing on.
[EntityInput("SetRotationDistance")]
protected void InputSetRotationDistance(EntityInputData data)Parameters
data EntityInputData
InputSetSpeed(EntityInputData)
Changes the speed, carrying on at the new one if the door is swinging.
[EntityInput("SetSpeed")]
protected void InputSetSpeed(EntityInputData data)Parameters
data EntityInputData
InputToggle(EntityInputData)
Opens a closed door forward and closes an open one. A moving or ajar door ignores it.
[EntityInput("Toggle")]
protected void InputToggle(EntityInputData data)Parameters
data EntityInputData
InputUnlock(EntityInputData)
Lets the door open again.
[EntityInput("Unlock")]
protected void InputUnlock(EntityInputData data)Parameters
data EntityInputData
MoveDone()
Runs when BaseEntity.MoveDoneTime comes due, after the tick's movement was applied.
public override void MoveDone()OnEndBlocked()
Runs on the first push that is no longer blocked.
protected override void OnEndBlocked()OnRemove()
Called as the entity leaves the world, before its nodes leave the scene. Release anything the entity started here, such as a playing sound.
protected override void OnRemove()OnStartBlocked(BaseEntity)
Runs on the first tick something blocks the swing; the door holds and falls quiet until clear.
protected override void OnStartBlocked(BaseEntity blocker)Parameters
blocker BaseEntity
Spawn()
Sets up the entity (model, class keyvalues, first think). Called once the entity's spawn group has created all entities of the group, after the move parent has spawned.
public override void Spawn()Remarks
An override calls this first: it builds the node from BaseEntity.CreateRootNode() and snaps the entity onto its parent's attachment, which the rest of the override reads.
Use(BaseEntity?)
Runs when something presses the door; the leading door of a double door answers for both.
public override void Use(BaseEntity? activator)Parameters
activator BaseEntity?

