1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-19 09:39:48 +00:00

Fix manual mode when the tilemap is empty.

This commit is contained in:
Emmanouil Papadeas 2024-11-26 14:11:56 +02:00
parent 2ccb9dd6f7
commit ad919a2a10

View file

@ -352,7 +352,8 @@ func update_texture(undo := false) -> void:
var rect := Rect2i(coords, tileset.tile_size) var rect := Rect2i(coords, tileset.tile_size)
var image_portion := image.get_region(rect) var image_portion := image.get_region(rect)
var current_tile := tileset.tiles[index] var current_tile := tileset.tiles[index]
if index == 0 and tileset.tiles.size() > 1: if index == 0:
if tileset.tiles.size() > 1:
# Prevent from drawing on empty image portions. # Prevent from drawing on empty image portions.
var tile_size := current_tile.image.get_size() var tile_size := current_tile.image.get_size()
image.blit_rect(current_tile.image, Rect2i(Vector2i.ZERO, tile_size), coords) image.blit_rect(current_tile.image, Rect2i(Vector2i.ZERO, tile_size), coords)