fix(maps): set_cell_material invalidates _dirty + _opaque_ceiling
Mirrors the cache-invalidation that set_vertex and set_cell_gid do. Without this, a cell-tile material write would update the storage but the opaque-ceiling cache could continue to report a stale state until something else invalidated it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2
init.lua
2
init.lua
@@ -1600,6 +1600,8 @@ function M.set_cell_material(layer_name, cx, cy, painted, map_id)
|
||||
end
|
||||
local cm = ensure_cells_material(layer, w, h)
|
||||
cm[cy * w + cx + 1] = painted and 1 or 0
|
||||
m._dirty = true
|
||||
m._opaque_ceiling = nil
|
||||
end
|
||||
|
||||
-- 0.5.7: read the per-cell material flag. Returns false if
|
||||
|
||||
Reference in New Issue
Block a user