mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 06:27:17 +00:00
fixed a crash trying to generate nowalls e.g. in {3,7}
This commit is contained in:
parent
0da2c70674
commit
2dba723eb3
@ -849,7 +849,7 @@ EX bool buildBarrierNowall(cell *c, eLand l2, int forced_dir IS(NODIR)) {
|
|||||||
vector<int> ds = hrandom_permutation(c->type);
|
vector<int> ds = hrandom_permutation(c->type);
|
||||||
|
|
||||||
for(int i=0; i<c->type; i++) {
|
for(int i=0; i<c->type; i++) {
|
||||||
int d = forced_dir != NODIR ? forced_dir : (valence()>3 && !INVERSE) ? (2+(i&1)) : ds[i];
|
int d = forced_dir != NODIR ? forced_dir : (valence()>3 && c->type > 3 && !INVERSE) ? (2+(i&1)) : ds[i];
|
||||||
/* if(warpv && GOLDBERG) {
|
/* if(warpv && GOLDBERG) {
|
||||||
d = hrand(c->type); */
|
d = hrand(c->type); */
|
||||||
if(warpv && c->move(d) && c->move(d)->mpdist < c->mpdist) continue;
|
if(warpv && c->move(d) && c->move(d)->mpdist < c->mpdist) continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user