From 5375528d7c7a4f860d04ffff0107bb2d50c9c1d8 Mon Sep 17 00:00:00 2001 From: Johannes Berthel Date: Sat, 27 Mar 2021 13:57:50 +0100 Subject: [PATCH] use map tilewidth instead of hardcoded values --- front/src/Phaser/Game/GameScene.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 6b50109b..6faaf4fa 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -817,7 +817,7 @@ export class GameScene extends ResizableScene implements CenterListener { const y = Math.floor(key / layer.width); const x = key % layer.width; - possibleStartPositions.push({x: x*32, y: y*32}); + possibleStartPositions.push({x: x * this.mapFile.tilewidth, y: y * this.mapFile.tilewidth}); }); // Get a value at random amongst allowed values if (possibleStartPositions.length === 0) {