Skip to content

Commit 367cc23

Browse files
committed
wall 3x3 check
1 parent 3623b70 commit 367cc23

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

client/src/playback/Brushes.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,15 @@ export class WallsBrush extends SymmetricMapEditorBrush<StaticMap> {
317317
const cheeseMine = this.map.cheeseMines.findIndex((l) => squareIntersects(l, pos, 2))
318318
const dirt = this.map.initialDirt[idx]
319319

320+
for(const waypoints of this.map.catWaypoints.values()){
321+
for(const waypoint of waypoints){
322+
if(waypoint.x === pos.x && waypoint.y === pos.y) return true
323+
for(let nei of this.map.getNeighbors(waypoint.x, waypoint.y)){
324+
if(nei.x === pos.x && nei.y === pos.y) return true
325+
}
326+
}
327+
}
328+
320329
if (cheeseMine !== -1 || dirt) return true
321330

322331
this.map.walls[idx] = 1

0 commit comments

Comments
 (0)