Skip to content

Commit

Permalink
Account for scale when calculating sprite offset
Browse files Browse the repository at this point in the history
  • Loading branch information
eoineoineoin committed Sep 28, 2024
1 parent 1c3ea96 commit 24e8327
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Robust.Client/UserInterface/Controls/SpriteView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ internal override void DrawInternal(IRenderHandle renderHandle)

var offset = SpriteOffset
? Vector2.Zero
: - (-_eyeRotation).RotateVec(sprite.Offset) * new Vector2(1, -1) * EyeManager.PixelsPerMeter;
: - (-_eyeRotation).RotateVec(sprite.Offset * _scale) * new Vector2(1, -1) * EyeManager.PixelsPerMeter;

var position = PixelSize / 2 + offset * stretch * UIScale;
var scale = Scale * UIScale * stretch;
Expand Down

0 comments on commit 24e8327

Please sign in to comment.