diff --git a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs index bcd49e5c89..7f4228b272 100644 --- a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs +++ b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs @@ -58,8 +58,7 @@ namespace Content.Server.GameObjects.Components.Doors private const float DoorStunTime = 5f; protected bool Safety = true; - [ViewVariables] - private bool _occludes; + [ViewVariables] private bool _occludes; public override void ExposeData(ObjectSerializer serializer) { @@ -111,18 +110,25 @@ namespace Content.Server.GameObjects.Components.Doors { return; } + + // Disabled because it makes it suck hard to walk through double doors. + if (entity.HasComponent(typeof(SpeciesComponent))) { if (!entity.TryGetComponent(out var mover)) return; + /* // TODO: temporary hack to fix the physics system raising collision events akwardly. // E.g. when moving parallel to a door by going off the side of a wall. var (walking, sprinting) = mover.VelocityDir; // Also TODO: walking and sprint dir are added together here // instead of calculating their contribution correctly. var dotProduct = Vector2.Dot((sprinting + walking).Normalized, (entity.Transform.WorldPosition - Owner.Transform.WorldPosition).Normalized); - if (dotProduct <= -0.9f) + if (dotProduct <= -0.85f) TryOpen(entity); + */ + + TryOpen(entity); } } @@ -144,6 +150,7 @@ namespace Content.Server.GameObjects.Components.Doors { return true; } + return accessReader.IsAllowed(user); } @@ -204,6 +211,7 @@ namespace Content.Server.GameObjects.Components.Doors { return true; } + return accessReader.IsAllowed(user); } @@ -214,6 +222,7 @@ namespace Content.Server.GameObjects.Components.Doors Deny(); return; } + Close(); } @@ -242,6 +251,7 @@ namespace Content.Server.GameObjects.Components.Doors stun.Paralyze(DoorStunTime); hitSomeone = true; } + // If we hit someone, open up after stun (opens right when stun ends) if (hitSomeone) {