mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-04-09 04:06:44 +00:00
celldistance now returns DISTANCE_UNKNOWN instead of 64 if it does not know
This commit is contained in:
parent
bca567cc10
commit
40e5f7f930
6
cell.cpp
6
cell.cpp
@ -966,7 +966,7 @@ int celldistance(cell *c1, cell *c2) {
|
||||
if(saved_distances.count(make_pair(c1,c2)))
|
||||
return saved_distances[make_pair(c1,c2)];
|
||||
|
||||
return 64;
|
||||
return DISTANCE_UNKNOWN;
|
||||
}
|
||||
|
||||
#if CAP_CRYSTAL
|
||||
@ -978,7 +978,7 @@ int celldistance(cell *c1, cell *c2) {
|
||||
if(saved_distances.count(make_pair(c1,c2)))
|
||||
return saved_distances[make_pair(c1,c2)];
|
||||
|
||||
if(dists_computed.count(c1)) return 64;
|
||||
if(dists_computed.count(c1)) return DISTANCE_UNKNOWN;
|
||||
|
||||
if(isize(saved_distances) > perma_distances + 1000000) erase_saved_distances();
|
||||
compute_saved_distances(c1, 64, 1000);
|
||||
@ -988,7 +988,7 @@ int celldistance(cell *c1, cell *c2) {
|
||||
if(saved_distances.count(make_pair(c1,c2)))
|
||||
return saved_distances[make_pair(c1,c2)];
|
||||
|
||||
return 64;
|
||||
return DISTANCE_UNKNOWN;
|
||||
}
|
||||
|
||||
#if CAP_BT && MAXMDIM >= 4
|
||||
|
1
hyper.h
1
hyper.h
@ -2567,6 +2567,7 @@ transmatrix iddspin(cell *c, int d, ld bonus = 0);
|
||||
bool doexiton(int sym, int uni);
|
||||
void switchFullscreen();
|
||||
string turnstring(int i);
|
||||
static const int DISTANCE_UNKNOWN = 127;
|
||||
int celldistance(cell *c1, cell *c2);
|
||||
int hyperbolic_celldistance(cell *c1, cell *c2);
|
||||
bool behindsphere(const transmatrix& V);
|
||||
|
Loading…
x
Reference in New Issue
Block a user