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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user