mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-10 15:59:53 +00:00
made bfs in 3D always know nearby cells even if gmatrix not known
This commit is contained in:
parent
305d546ae1
commit
0b0ad4abe3
@ -368,7 +368,7 @@ EX void bfs() {
|
|||||||
c2->wall = waSea;
|
c2->wall = waSea;
|
||||||
|
|
||||||
if(c2 && signed(c2->cpdist) > d+1) {
|
if(c2 && signed(c2->cpdist) > d+1) {
|
||||||
if(WDIM == 3 && !gmatrix.count(c2)) {
|
if(WDIM == 3 && (d > 2 && !gmatrix.count(c2))) {
|
||||||
if(!first7) first7 = qb;
|
if(!first7) first7 = qb;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
2
reg3.cpp
2
reg3.cpp
@ -2585,7 +2585,7 @@ int celldistance_534(cell *c1, cell *c2) {
|
|||||||
|
|
||||||
vector<cell*> s1 = {c1};
|
vector<cell*> s1 = {c1};
|
||||||
vector<cell*> s2 = {c2};
|
vector<cell*> s2 = {c2};
|
||||||
int best = 99999999;
|
int best = DISTANCE_UNKNOWN;
|
||||||
int d0 = 0;
|
int d0 = 0;
|
||||||
|
|
||||||
auto go_nearer = [&] (vector<cell*>& v, int& d) {
|
auto go_nearer = [&] (vector<cell*>& v, int& d) {
|
||||||
|
Loading…
Reference in New Issue
Block a user