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 {
|
struct clearingdata {
|
||||||
cell *root;
|
cell *root;
|
||||||
int dist;
|
int dist;
|
||||||
|
bool buggy;
|
||||||
|
clearingdata() { root = nullptr; }
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EX bool buggyplant = false;
|
|
||||||
|
|
||||||
EX std::map<heptagon*, clearingdata> bpdata;
|
EX std::map<heptagon*, clearingdata> bpdata;
|
||||||
|
|
||||||
EX cell *current_root;
|
EX cell *current_root;
|
||||||
@ -873,7 +873,6 @@ EX namespace clearing {
|
|||||||
vector<cell*> rpath;
|
vector<cell*> rpath;
|
||||||
|
|
||||||
EX void generate(cell *c) {
|
EX void generate(cell *c) {
|
||||||
if(buggyplant) return;
|
|
||||||
if(sphere) return;
|
if(sphere) return;
|
||||||
if(NONSTDVAR) return;
|
if(NONSTDVAR) return;
|
||||||
if(quotient) return;
|
if(quotient) return;
|
||||||
@ -902,7 +901,8 @@ EX namespace clearing {
|
|||||||
if(pseudohept(c)) return;
|
if(pseudohept(c)) return;
|
||||||
heptagon *a = euclid ? NULL : c->master->alt->alt;
|
heptagon *a = euclid ? NULL : c->master->alt->alt;
|
||||||
clearingdata& bd(bpdata[a]);
|
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();
|
onpath.clear(); pdir.clear(); rpath.clear();
|
||||||
|
|
||||||
@ -919,6 +919,7 @@ EX namespace clearing {
|
|||||||
stepcount++;
|
stepcount++;
|
||||||
if(stepcount > 100000000) {
|
if(stepcount > 100000000) {
|
||||||
printf("buggy #1\n");
|
printf("buggy #1\n");
|
||||||
|
bd.buggy = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -941,8 +942,8 @@ EX namespace clearing {
|
|||||||
onpath[i]->item = itBuggy;
|
onpath[i]->item = itBuggy;
|
||||||
for(int i=0; i<(int) rpath.size(); i++)
|
for(int i=0; i<(int) rpath.size(); i++)
|
||||||
rpath[i]->item = itBuggy;
|
rpath[i]->item = itBuggy;
|
||||||
buggyplant = true;
|
printf("buggy #2\n");
|
||||||
printf("buggygen\n");
|
bd.buggy = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rpath.push_back(bd.root);
|
rpath.push_back(bd.root);
|
||||||
|
@ -1373,7 +1373,6 @@ EX void movemutant() {
|
|||||||
|
|
||||||
for(int i=0; i<isize(young); i++) {
|
for(int i=0; i<isize(young); i++) {
|
||||||
cell *c = 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++) {
|
for(int j=0; j<c->type; j++) {
|
||||||
movei mi(c, j);
|
movei mi(c, j);
|
||||||
auto& c2 = mi.t;
|
auto& c2 = mi.t;
|
||||||
|
Loading…
Reference in New Issue
Block a user