Fix drawable storyboard sprites not flipping origin on negative scale

This commit is contained in:
Salman Ahmed 2022-03-14 03:50:12 +03:00
parent 720e1cd206
commit 0b8c89bfa8
1 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ public override Anchor Origin
{
var origin = base.Origin;
if (FlipH)
if ((FlipH || VectorScale.X < 0) && !(FlipH && VectorScale.X < 0))
{
if (origin.HasFlagFast(Anchor.x0))
origin = Anchor.x2 | (origin & (Anchor.y0 | Anchor.y1 | Anchor.y2));
@ -87,7 +87,7 @@ public override Anchor Origin
origin = Anchor.x0 | (origin & (Anchor.y0 | Anchor.y1 | Anchor.y2));
}
if (FlipV)
if ((FlipV || VectorScale.Y < 0) && !(FlipV && VectorScale.Y < 0))
{
if (origin.HasFlagFast(Anchor.y0))
origin = Anchor.y2 | (origin & (Anchor.x0 | Anchor.x1 | Anchor.x2));