From ab8604c51c39d7eaaa0bc48055c7e182a7e56b64 Mon Sep 17 00:00:00 2001 From: sasha80 Date: Fri, 22 Aug 2025 08:51:50 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5.=20W=200:00:01:527=20=20=20The=20varia?= =?UTF-8?q?ble=20"tile"=20is=20declared=20below=20in=20the=20parent=20bloc?= =?UTF-8?q?k.=20<=D0=9E=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20GDScript>CONFUSABL?= =?UTF-8?q?E=5FLOCAL=5FDECLARATION=20<=D0=98=D1=81=D1=85=D0=BE=D0=B4=D0=BD?= =?UTF-8?q?=D1=8B=D0=B9=20=D0=BA=D0=BE=D0=B4=20GDScript>tilemap.gd:567?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/tilemap/tilemap.gd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scenes/tilemap/tilemap.gd b/scenes/tilemap/tilemap.gd index 9b6381b..7c45728 100644 --- a/scenes/tilemap/tilemap.gd +++ b/scenes/tilemap/tilemap.gd @@ -562,14 +562,15 @@ func get_tile(x: int, y: int, z: int) -> Tile: var idx: int = xyz_to_idx(x, y, z) + var tile = null var req: = get_node_or_null(NodePath(TILE_REQUEST_NAME % idx)) if req: - var tile = req.get_meta('tile') + tile = req.get_meta('tile') if tile != null: tile.t = now return tile - var tile = _cache.get(idx) + tile = _cache.get(idx) if tile: tile.t = now return tile From 116827041bbe1a2ee5940bc300844d48a9c2d62b Mon Sep 17 00:00:00 2001 From: sasha80 Date: Fri, 22 Aug 2025 09:02:55 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5.=20=D0=A3=D1=81=D1=82=D1=80=D0=B0?= =?UTF-8?q?=D0=BD=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80=D0=B5=D0=B4=D1=83?= =?UTF-8?q?=D0=BF=D1=80=D0=B5=D0=B6=D0=B4=D0=B5=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/tilemap/tilemap.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scenes/tilemap/tilemap.gd b/scenes/tilemap/tilemap.gd index 7c45728..d06c8f0 100644 --- a/scenes/tilemap/tilemap.gd +++ b/scenes/tilemap/tilemap.gd @@ -288,7 +288,7 @@ func _draw() -> void: visible_marks_count = 0 for dot in _marks.values(): var scr_pos: Vector2 = world_to_screen(dot.position) - scr_pos.x = posmod(scr_pos.x, dx) + scr_pos.x = posmod(int(scr_pos.x), int(dx)) dot.mark.position = scr_pos dot.mark.visible = is_mark_visible(dot) dot.mark.visible = c.distance_to(scr_pos) < (r - dot.gap_size) @@ -432,7 +432,7 @@ func check_borders(p1, p2, h): func _draw_tile(tx: int, ty: int, z: float) -> void: - var tz: float = floor(z) + var tz: = int(floor(z)) var p1: = tile_to_screen(tx, ty, z) var p2: = tile_to_screen(tx + 1, ty + 1, z) var tile: = get_tile(tx, ty, tz) @@ -441,7 +441,7 @@ func _draw_tile(tx: int, ty: int, z: float) -> void: check_borders(p1, p2, $canvas.size.y) draw_texture_rect(tile.texture, Rect2(p1, p2 - p1), false, Color.WHITE, false) else: - var zzz: float = tz + var zzz: = tz var txx: = tx var tyy: = ty while zzz > 1: