From 3e87cfa7143d0bdbe84060a3ef5bfb3e55634cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Aguilera=20Puerto?= Date: Mon, 7 Sep 2020 17:45:46 +0200 Subject: [PATCH] whoops. --- .../GameObjects/Components/Atmos/AirtightComponent.cs | 4 ++-- Content.Shared/Atmos/AtmosDirection.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.Server/GameObjects/Components/Atmos/AirtightComponent.cs b/Content.Server/GameObjects/Components/Atmos/AirtightComponent.cs index 0f4bd50457..cec4a0b38c 100644 --- a/Content.Server/GameObjects/Components/Atmos/AirtightComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/AirtightComponent.cs @@ -95,7 +95,7 @@ namespace Content.Server.GameObjects.Components.Atmos private void RotateEvent(RotateEvent ev) { - if (!_rotateAirBlocked || ev.Sender != Owner || ev.NewRotation == ev.OldRotation) + if (!_rotateAirBlocked || ev.Sender != Owner || ev.NewRotation == ev.OldRotation || AirBlockedDirection == AtmosDirection.Invalid) return; var diff = ev.NewRotation - ev.OldRotation; @@ -105,7 +105,7 @@ namespace Content.Server.GameObjects.Components.Atmos // When we make multiZ atmos, special case this. for (int i = 0; i < Atmospherics.Directions; i++) { - var direction = (AtmosDirection) i; + var direction = (AtmosDirection) (1 << i); if (!AirBlockedDirection.HasFlag(direction)) continue; var angle = direction.ToAngle(); angle += diff; diff --git a/Content.Shared/Atmos/AtmosDirection.cs b/Content.Shared/Atmos/AtmosDirection.cs index aab6f1b7ad..fa0f36cc8f 100644 --- a/Content.Shared/Atmos/AtmosDirection.cs +++ b/Content.Shared/Atmos/AtmosDirection.cs @@ -96,7 +96,7 @@ namespace Content.Shared.Atmos AtmosDirection.SouthWest => Angle.FromDegrees(225), AtmosDirection.SouthEast => Angle.FromDegrees(315), - _ => throw new ArgumentOutOfRangeException(nameof(direction)), + _ => throw new ArgumentOutOfRangeException(nameof(direction), $"It was {direction}."), }; }