Fix icon smoothing component not working with rotated entities (#2455)

This commit is contained in:
DrSmugleaf
2020-10-30 16:28:54 +01:00
committed by GitHub
parent d8f5bffaa0
commit f52ec5a8f7

View File

@@ -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);
}
}
/// <inheritdoc />