Don't re-close closed doors (#15007)

Fixes them re-closing on shuttle departure. If this is bad can just make shuttle code handle it but this seemed more appropriate?
This commit is contained in:
metalgearsloth
2023-04-04 04:28:27 +10:00
committed by GitHub
parent fc61b9da62
commit 846274b7b8
4 changed files with 73 additions and 61 deletions

View File

@@ -326,7 +326,7 @@ public abstract class SharedDoorSystem : EntitySystem
// since both closing/closed and welded are door states, we need to prevent 'closing'
// a welded door or else there will be weird state bugs
if (door.State == DoorState.Welded)
if (door.State is DoorState.Welded or DoorState.Closed)
return false;
var ev = new BeforeDoorClosedEvent(door.PerformCollisionCheck);