This commit is contained in:
Víctor Aguilera Puerto
2020-09-07 17:45:46 +02:00
parent 2aa1486b13
commit 3e87cfa714
2 changed files with 3 additions and 3 deletions

View File

@@ -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;

View File

@@ -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}."),
};
}