diff --git a/complex.cpp b/complex.cpp index 76217034..8610a898 100644 --- a/complex.cpp +++ b/complex.cpp @@ -790,11 +790,11 @@ EX namespace clearing { struct clearingdata { cell *root; int dist; + bool buggy; + clearingdata() { root = nullptr; } }; #endif - EX bool buggyplant = false; - EX std::map bpdata; EX cell *current_root; @@ -873,7 +873,6 @@ EX namespace clearing { vector rpath; EX void generate(cell *c) { - if(buggyplant) return; if(sphere) return; if(NONSTDVAR) return; if(quotient) return; @@ -902,7 +901,8 @@ EX namespace clearing { if(pseudohept(c)) return; heptagon *a = euclid ? NULL : c->master->alt->alt; clearingdata& bd(bpdata[a]); - if(!bd.root) { bd.root = c; bd.dist = 8; } + if(!bd.root) { bd.root = c; bd.dist = 8; bd.buggy = false; } + if(bd.buggy) return; onpath.clear(); pdir.clear(); rpath.clear(); @@ -919,6 +919,7 @@ EX namespace clearing { stepcount++; if(stepcount > 100000000) { printf("buggy #1\n"); + bd.buggy = true; return; } @@ -941,8 +942,8 @@ EX namespace clearing { onpath[i]->item = itBuggy; for(int i=0; i<(int) rpath.size(); i++) rpath[i]->item = itBuggy; - buggyplant = true; - printf("buggygen\n"); + printf("buggy #2\n"); + bd.buggy = true; return; } rpath.push_back(bd.root); diff --git a/monstermove.cpp b/monstermove.cpp index 0cccb647..c056c191 100644 --- a/monstermove.cpp +++ b/monstermove.cpp @@ -1373,7 +1373,6 @@ EX void movemutant() { for(int i=0; imonst == moMutant) c->monst=moNone; continue; } for(int j=0; jtype; j++) { movei mi(c, j); auto& c2 = mi.t;