From f52ec5a8f7b9a2445ca5afa552294a3c8ccb911e Mon Sep 17 00:00:00 2001 From: DrSmugleaf Date: Fri, 30 Oct 2020 16:28:54 +0100 Subject: [PATCH] Fix icon smoothing component not working with rotated entities (#2455) --- .../Components/IconSmoothing/IconSmoothComponent.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Content.Client/GameObjects/Components/IconSmoothing/IconSmoothComponent.cs b/Content.Client/GameObjects/Components/IconSmoothing/IconSmoothComponent.cs index 2513b6f062..f1e432e50c 100644 --- a/Content.Client/GameObjects/Components/IconSmoothing/IconSmoothComponent.cs +++ b/Content.Client/GameObjects/Components/IconSmoothing/IconSmoothComponent.cs @@ -203,7 +203,17 @@ namespace Content.Client.GameObjects.Components.IconSmoothing cornerNW |= CornerFill.Diagonal; } - return (cornerNE, cornerNW, cornerSW, cornerSE); + switch (Owner.Transform.WorldRotation.GetCardinalDir()) + { + case Direction.North: + return (cornerSW, cornerSE, cornerNE, cornerNW); + case Direction.West: + return (cornerSE, cornerNE, cornerNW, cornerSW); + case Direction.South: + return (cornerNE, cornerNW, cornerSW, cornerSE); + default: + return (cornerNW, cornerSW, cornerSE, cornerNE); + } } ///