From 94fd7883166764aadb28aadcd495cf94a91b9738 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 23 Dec 2019 20:52:25 +0100 Subject: [PATCH] pattern 'P' now uses permanent_long_distances --- cell.cpp | 2 +- pattern2.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cell.cpp b/cell.cpp index 242007fe..a76ff566 100644 --- a/cell.cpp +++ b/cell.cpp @@ -935,7 +935,7 @@ EX int heptdistance(cell *c1, cell *c2) { map, int> saved_distances; -set keep_distances_from; +EX set keep_distances_from; set dists_computed; diff --git a/pattern2.cpp b/pattern2.cpp index a562d7b3..cae7d71c 100644 --- a/pattern2.cpp +++ b/pattern2.cpp @@ -1635,7 +1635,10 @@ EX namespace patterns { return res; } 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]; if(d > 3) res |= 0x1000000; return res;