Исправление. Возможно обращение к несуществующим метаданным

This commit is contained in:
sasha80
2025-08-05 15:44:58 +03:00
parent b521a1fed5
commit 7c3dfd3016

View File

@@ -562,16 +562,15 @@ func get_tile(x: int, y: int, z: int) -> Tile:
return null
var idx = xyz_to_idx(x, y, z)
var tile = null
var req = get_node_or_null(NodePath(str(idx)))
var req: = get_node_or_null(NodePath(TILE_REQUEST_NAME % idx))
if req:
tile = req.get_meta('tile')
var tile = req.get_meta('tile')
if tile != null:
tile.t = now
return tile
tile = _cache.get(idx)
var tile = _cache.get(idx)
if tile:
tile.t = now
return tile