From c726acd0467906afee74afb7051bb2e705e26565 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sun, 23 Jul 2023 16:46:05 +0200 Subject: add chunk offset to rendering --- src/editor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/editor.c') diff --git a/src/editor.c b/src/editor.c index 2c9de3a..73c1e5a 100644 --- a/src/editor.c +++ b/src/editor.c @@ -59,13 +59,11 @@ void update(Tiled *tiled) { updateTiledCamera(tiled); Vector2 mousePos = GetMousePosition(); Vector2 mapPos = translateTiledPosition(*tiled, mousePos); - if (mapPos.x >= 0 && mapPos.x < tiled->mapSize[0] - && mapPos.y >= 0 && mapPos.y < tiled->mapSize[1]) { + lastSelectedTile[0] = selectedTile[0]; lastSelectedTile[1] = selectedTile[1]; selectedTile[0] = mapPos.x; selectedTile[1] = mapPos.y; - } handleInputs(tiled); } -- cgit v1.2.1