From 29cd39ff2002df0f9452aee8c09c973bee154c88 Mon Sep 17 00:00:00 2001 From: BenjaminAmos <24301287+BenjaminAmos@users.noreply.github.com> Date: Sat, 3 Sep 2022 16:32:31 +0100 Subject: [PATCH] fix(mazes): fix incorrect sprite rotation for maze tiles (#644) --- .../java/org/destinationsol/game/maze/MazeTileObject.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/main/java/org/destinationsol/game/maze/MazeTileObject.java b/engine/src/main/java/org/destinationsol/game/maze/MazeTileObject.java index 9ea1d9274..8dd5d2675 100644 --- a/engine/src/main/java/org/destinationsol/game/maze/MazeTileObject.java +++ b/engine/src/main/java/org/destinationsol/game/maze/MazeTileObject.java @@ -188,9 +188,9 @@ public MazeTileObject build(SolGame game, MazeTile tile, Vector2 position, float tex.flip(!tex.isFlipX(), !tex.isFlipY()); backgroundTexture.flip(!backgroundTexture.isFlipX(), !backgroundTexture.isFlipY()); } - RectSprite s = SpriteManager.createSprite(tex.name, MazeBuilder.TILE_SZ, 0, 0, new Vector2(), DrawableLevel.GROUND, 0, 0, SolColor.WHITE, false); + RectSprite s = SpriteManager.createStaticSprite(tex, MazeBuilder.TILE_SZ, 0, 0, new Vector2(), DrawableLevel.GROUND, 0, 0, SolColor.WHITE, false); drawables.add(s); - RectSprite s2 = SpriteManager.createSprite(backgroundTexture.name, MazeBuilder.TILE_SZ, 0, 0, new Vector2(), DrawableLevel.DECO, 0, 0, SolColor.WHITE, false); + RectSprite s2 = SpriteManager.createStaticSprite(backgroundTexture, MazeBuilder.TILE_SZ, 0, 0, new Vector2(), DrawableLevel.DECO, 0, 0, SolColor.WHITE, false); drawables.add(s2); Body body = buildBody(game, angle, position, tile, flipped); MazeTileObject res = new MazeTileObject(tile, drawables, body, position, angle, flipped);