Skip to content

Commit 62a397c

Browse files
committed
Fixed issue where mirror reflection would not display properly with non-standard zoom level
1 parent 91f54af commit 62a397c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

DynamicReflections/Framework/Utilities/SpriteBatchToolkit.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ internal static void RenderMirrorReflectionPlayerSprite()
222222
var flipEffect = Game1.player.FacingDirection is (0 or 2) ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
223223

224224
// This variable (flipOffset) is required to re-adjust the flipped screen (as the player sprite may not be in the center)
225-
var flipOffset = Game1.player.FacingDirection is (0 or 2) ? (Game1.viewport.Width - Game1.GlobalToLocal(Game1.viewport, Game1.player.Position).X * 2) - 64 : 0f;
225+
var flipOffset = Game1.player.FacingDirection is (0 or 2) ? (Game1.viewport.Width * Game1.options.zoomLevel - Game1.GlobalToLocal(Game1.viewport, Game1.player.Position).X * 2) - 64 : 0f;
226226

227227
// TODO: Implement these for Mirror.ReflectionScale
228228
var scale = new Vector2(1f, 1f);

0 commit comments

Comments
 (0)