From f8c13ea531b2400ae13233c57dd0f156cc7d9300 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 9 Aug 2021 00:50:39 +0200 Subject: [PATCH] better checking of pathlock --- environment.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/environment.cpp b/environment.cpp index a4ad6056..8a59df27 100644 --- a/environment.cpp +++ b/environment.cpp @@ -89,6 +89,7 @@ EX cell *pd_from; EX int pd_range; EX void onpath(cell *c, int d) { + if(!pathlock) { println(hlog, "onpath without pathlock"); } c->pathdist = d; pathq.push_back(c); } @@ -117,6 +118,7 @@ EX void compute_graphical_distance() { pd_range = sr; c1->pathdist = 0; pathq.push_back(pd_from); + pathlock++; for(int qb=0; qbpathdist == PINFD) onpath(c1, c->pathdist + 1); } + + pathlock--; } const int max_radius = 16;