fixed a crash bug with Random Pattern Red Rock Valley on mobiles

This commit is contained in:
Zeno Rogue 2017-09-17 13:13:05 +02:00
parent a11ffd2845
commit 30ab400ad0
1 changed files with 2 additions and 1 deletions

View File

@ -2893,6 +2893,7 @@ eMonster randomHyperbug() {
}
#define RANDPATC(c) (randpattern(c,randompattern[c->land]))
#define RANDPATCL(c, l) (randpattern(c,l))
#define RANDPAT (randpattern(c,randompattern[c->land]))
#define RANDPAT3(i) (randpatternMajority(c,i,RANDITER))
#define RANDPATV(x) (randpattern(c,randompattern[x]))
@ -4436,7 +4437,7 @@ void setdist(cell *c, int d, cell *from) {
else {
int k = 0;
for(int i=0; i<20; i++)
if(RANDPATC(c->mov[i%7]) && !RANDPATC(c->mov[(i+1)%7]))
if(RANDPATCL(createMov(c, i%7), laRedRock) && !RANDPATCL(createMov(c, (i+1)%7), laRedRock))
k++;
if(k>=4) buildRedWall(c, 20);
}