mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
out_of_bounds cell
This commit is contained in:
parent
2320619b86
commit
3a0b383b9b
2
cell.cpp
2
cell.cpp
@ -1364,4 +1364,6 @@ EX bool is_boundary(cell *c) {
|
|||||||
return (cgflags & qPORTALSPACE) && isWall(c->wall);
|
return (cgflags & qPORTALSPACE) && isWall(c->wall);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EX cell out_of_bounds;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1720,6 +1720,7 @@ void hrmap::draw_at(cell *at, const shiftmatrix& where) {
|
|||||||
for(int i=0; i<c->type; i++) {
|
for(int i=0; i<c->type; i++) {
|
||||||
// note: need do cmove before c.spin
|
// note: need do cmove before c.spin
|
||||||
cell *c1 = c->cmove(i);
|
cell *c1 = c->cmove(i);
|
||||||
|
if(c1 == &out_of_bounds) continue;
|
||||||
enq(c1, optimized_shift(V * adj(c, i)));
|
enq(c1, optimized_shift(V * adj(c, i)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2877,6 +2877,7 @@ EX hookset<bool(cell *c, int d, cell *from)> hooks_cellgen;
|
|||||||
|
|
||||||
EX void setdist(cell *c, int d, cell *from) {
|
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(fake::in()) return FPIU(setdist(c, d, from));
|
||||||
|
|
||||||
if(c->mpdist <= d) return;
|
if(c->mpdist <= d) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user