From 888b88207440d1aa62351443940c2160289cbdcb Mon Sep 17 00:00:00 2001 From: Benjamin Amos Date: Tue, 12 Jul 2022 20:51:39 +0100 Subject: [PATCH] fix(mazes): fix incorrect sprite rotation for maze tiles --- .../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);