From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sat, 23 Nov 2024 09:31:07 +0000 (+1100) Subject: Fix door animations mispredicting if closing is interrupted (#33481) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=c3786a56dcbb03d53eb8a42d69105936398d5eff;p=space-station-14.git 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 --- 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);