mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-09-28 22:10:40 +00:00
pattern 'P' now uses permanent_long_distances
This commit is contained in:
parent
97ea8f8c4b
commit
94fd788316
2
cell.cpp
2
cell.cpp
@ -935,7 +935,7 @@ EX int heptdistance(cell *c1, cell *c2) {
|
|||||||
|
|
||||||
map<pair<cell*, cell*>, int> saved_distances;
|
map<pair<cell*, cell*>, int> saved_distances;
|
||||||
|
|
||||||
set<cell*> keep_distances_from;
|
EX set<cell*> keep_distances_from;
|
||||||
|
|
||||||
set<cell*> dists_computed;
|
set<cell*> dists_computed;
|
||||||
|
|
||||||
|
@ -1635,7 +1635,10 @@ EX namespace patterns {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
case 'P': {
|
case 'P': {
|
||||||
int d = celldistance(c, currentmap->gamestart()->move(0));
|
cell *s = currentmap->gamestart()->move(0);
|
||||||
|
if(yendor::exhaustive_distance_appropriate() && !keep_distances_from.count(s))
|
||||||
|
permanent_long_distances(s);
|
||||||
|
int d = celldistance(s, c);
|
||||||
color_t res = distcolors[d];
|
color_t res = distcolors[d];
|
||||||
if(d > 3) res |= 0x1000000;
|
if(d > 3) res |= 0x1000000;
|
||||||
return res;
|
return res;
|
||||||
|
Loading…
Reference in New Issue
Block a user