From 3a0b383b9bbee4d41b6280bfba2051bd61cf39f5 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 16 Jun 2021 12:45:39 +0200 Subject: [PATCH] out_of_bounds cell --- cell.cpp | 2 ++ hypgraph.cpp | 1 + landgen.cpp | 1 + 3 files changed, 4 insertions(+) diff --git a/cell.cpp b/cell.cpp index fc63ba06..ffdca79c 100644 --- a/cell.cpp +++ b/cell.cpp @@ -1364,4 +1364,6 @@ EX bool is_boundary(cell *c) { return (cgflags & qPORTALSPACE) && isWall(c->wall); } +EX cell out_of_bounds; + } diff --git a/hypgraph.cpp b/hypgraph.cpp index 5937aaa7..b2ea1538 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -1720,6 +1720,7 @@ void hrmap::draw_at(cell *at, const shiftmatrix& where) { for(int i=0; itype; i++) { // note: need do cmove before c.spin cell *c1 = c->cmove(i); + if(c1 == &out_of_bounds) continue; enq(c1, optimized_shift(V * adj(c, i))); } } diff --git a/landgen.cpp b/landgen.cpp index 6a8fb0a5..11b03625 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -2877,6 +2877,7 @@ EX hookset hooks_cellgen; EX void setdist(cell *c, int d, cell *from) { + if(c == &out_of_bounds) return; if(fake::in()) return FPIU(setdist(c, d, from)); if(c->mpdist <= d) return;