Fix airlock collisions (#1030)

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
Jackson Lewis
2020-07-06 13:00:07 -07:00
committed by GitHub
parent 137511d8b9
commit 90982d8943

View File

@@ -154,7 +154,7 @@ namespace Content.Server.GameObjects
Timer.Spawn(OpenTimeOne, async () => Timer.Spawn(OpenTimeOne, async () =>
{ {
collidableComponent.CanCollide = false; collidableComponent.Hard = false;
await Timer.Delay(OpenTimeTwo, _cancellationTokenSource.Token); await Timer.Delay(OpenTimeTwo, _cancellationTokenSource.Token);
@@ -192,14 +192,14 @@ namespace Content.Server.GameObjects
public bool Close() public bool Close()
{ {
if (collidableComponent.IsColliding(Vector2.Zero)) if (collidableComponent.IsColliding(Vector2.Zero, false))
{ {
// Do nothing, somebody's in the door. // Do nothing, somebody's in the door.
return false; return false;
} }
State = DoorState.Closing; State = DoorState.Closing;
collidableComponent.CanCollide = true; collidableComponent.Hard = true;
OpenTimeCounter = 0; OpenTimeCounter = 0;
SetAppearance(DoorVisualState.Closing); SetAppearance(DoorVisualState.Closing);