From 0e3acfe91b3a4aa8ae8ac139bdbdb49ac9d3f337 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 25 Aug 2021 12:57:14 +0200 Subject: [PATCH] check_timeout in find_new_shortcuts --- rulegen.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rulegen.cpp b/rulegen.cpp index 0389d6f9..f114e560 100644 --- a/rulegen.cpp +++ b/rulegen.cpp @@ -404,13 +404,18 @@ EX void find_new_shortcuts(tcell *c, int d, tcell *alt, int newdir, int delta) { debuglist.push_back(c); solid_errors++; all_solid_errors++; + check_timeout(); /* may freeze no this */ if(flags & w_no_shortcut) return; ufindc(c); if(debugflags & DF_GEOM) println(hlog, "solid ", c, " changes ", c->dist, " to ", d, " alt=", alt); - if(newdir == c->any_nearer) return; + if(newdir == c->any_nearer) { + if(debugflags & DF_GEOM) + println(hlog, "same direction"); + return; + } /* { throw rulegen_failure("direction did not change"); } */