1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-20 15:40:26 +00:00

check_timeout in find_new_shortcuts

This commit is contained in:
Zeno Rogue 2021-08-25 12:57:14 +02:00
parent 83e69a4872
commit 0e3acfe91b

View File

@ -404,13 +404,18 @@ EX void find_new_shortcuts(tcell *c, int d, tcell *alt, int newdir, int delta) {
debuglist.push_back(c); debuglist.push_back(c);
solid_errors++; solid_errors++;
all_solid_errors++; all_solid_errors++;
check_timeout(); /* may freeze no this */
if(flags & w_no_shortcut) return; if(flags & w_no_shortcut) return;
ufindc(c); ufindc(c);
if(debugflags & DF_GEOM) if(debugflags & DF_GEOM)
println(hlog, "solid ", c, " changes ", c->dist, " to ", d, " alt=", alt); 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"); throw rulegen_failure("direction did not change");
} */ } */