mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-10-31 19:36:16 +00:00
replaced clearing::buggyplant with bpdata::buggy
This commit is contained in:
parent
103a3a3411
commit
c1c4cea31f
13
complex.cpp
13
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<heptagon*, clearingdata> bpdata;
|
||||
|
||||
EX cell *current_root;
|
||||
@ -873,7 +873,6 @@ EX namespace clearing {
|
||||
vector<cell*> 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);
|
||||
|
@ -1373,7 +1373,6 @@ EX void movemutant() {
|
||||
|
||||
for(int i=0; i<isize(young); i++) {
|
||||
cell *c = young[i];
|
||||
if(clearing::buggyplant) { if(c->monst == moMutant) c->monst=moNone; continue; }
|
||||
for(int j=0; j<c->type; j++) {
|
||||
movei mi(c, j);
|
||||
auto& c2 = mi.t;
|
||||
|
Loading…
Reference in New Issue
Block a user