mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-18 23:10:26 +00:00
3d:: vision-based gamerange in shmup
This commit is contained in:
parent
4a151f9c63
commit
f0092d9633
9
game.cpp
9
game.cpp
@ -3105,13 +3105,16 @@ void bfs() {
|
||||
}
|
||||
|
||||
int qb = 0;
|
||||
first7 = 0;
|
||||
while(true) {
|
||||
if(qb == isize(dcal)) break;
|
||||
int i, fd = reachedfrom[qb] + 3;
|
||||
cell *c = dcal[qb++];
|
||||
|
||||
int d = c->cpdist;
|
||||
if(d == distlimit) { first7 = qb; break; }
|
||||
|
||||
if(DIM == 2 && d == distlimit) { first7 = qb; break; }
|
||||
|
||||
for(int j=0; j<c->type; j++) if(i = (fd+j) % c->type, c->move(i)) {
|
||||
// printf("i=%d cd=%d\n", i, c->move(i)->cpdist);
|
||||
cell *c2 = c->move(i);
|
||||
@ -3125,6 +3128,10 @@ void bfs() {
|
||||
c2->wall = waSea;
|
||||
|
||||
if(c2 && signed(c2->cpdist) > d+1) {
|
||||
if(DIM == 3 && !gmatrix.count(c2)) {
|
||||
if(!first7) first7 = qb;
|
||||
continue;
|
||||
}
|
||||
c2->cpdist = d+1;
|
||||
|
||||
// remove treasures
|
||||
|
Loading…
Reference in New Issue
Block a user