Skip to content

Commit

Permalink
Fixed Kill Tiles on IntGrid layers (#1040)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Jan 10, 2024
1 parent 4fc20a3 commit fffc1de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/electron.renderer/data/inst/LayerInstance.hx
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ class LayerInstance {
return isValid(cx,cy) && gridTiles.exists( coordId(cx,cy) ) && gridTiles.get(coordId(cx,cy)).length>0;
}

function isAutoTileCellAllowed(cx:Int, cy:Int) {
inline function isAutoTileCellAllowed(cx:Int, cy:Int) {
if( def.autoTilesKilledByOtherLayerUid==null )
return true;
else
Expand Down
2 changes: 1 addition & 1 deletion src/electron.renderer/display/LevelRender.hx
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ class LevelRender extends dn.Process {
// Invalidate potentially killed auto-layers
if( li.def.type==Tiles )
for(other in editor.curLevel.layerInstances)
if( other.def.type==AutoLayer && other.def.autoTilesKilledByOtherLayerUid==li.layerDefUid )
if( other.def.isAutoLayer() && other.def.autoTilesKilledByOtherLayerUid==li.layerDefUid )
invalidateLayerArea(other, left, right, top, bottom);
}

Expand Down

0 comments on commit fffc1de

Please sign in to comment.