From c3786a56dcbb03d53eb8a42d69105936398d5eff Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sat, 23 Nov 2024 20:31:07 +1100 Subject: [PATCH] Fix door animations mispredicting if closing is interrupted (#33481) * Fix door animations mispredicting if closing is interrupted On master it will flicker states a little bit partially due to it not being predicted. Instead we'll just set it straight back to opening (no animation is ever played anyway). * no log --- Content.Shared/Doors/Systems/SharedDoorSystem.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Shared/Doors/Systems/SharedDoorSystem.cs b/Content.Shared/Doors/Systems/SharedDoorSystem.cs index 80e7ff9669..7fd5d61db7 100644 --- a/Content.Shared/Doors/Systems/SharedDoorSystem.cs +++ b/Content.Shared/Doors/Systems/SharedDoorSystem.cs @@ -461,17 +461,17 @@ public abstract partial class SharedDoorSystem : EntitySystem if (!Resolve(uid, ref door, ref physics)) return false; - door.Partial = true; - // Make sure no entity walked into the airlock when it started closing. if (!CanClose(uid, door)) { door.NextStateChange = GameTiming.CurTime + door.OpenTimeTwo; - door.State = DoorState.Opening; - AppearanceSystem.SetData(uid, DoorVisuals.State, DoorState.Opening); + door.State = DoorState.Open; + AppearanceSystem.SetData(uid, DoorVisuals.State, DoorState.Open); + Dirty(uid, door); return false; } + door.Partial = true; SetCollidable(uid, true, door, physics); door.NextStateChange = GameTiming.CurTime + door.CloseTimeTwo; Dirty(uid, door);