mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-08-07 22:33:54 +00:00
limit setland errors
This commit is contained in:
parent
548e2609ce
commit
24c196db15
@ -324,12 +324,15 @@ EX void setbarrier(cell *c) {
|
|||||||
setbarrier(c, c->barleft, c->barright, ctof(c));
|
setbarrier(c, c->barleft, c->barright, ctof(c));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EX int setland_max = 5;
|
||||||
|
|
||||||
EX void setland(cell *c, eLand l) {
|
EX void setland(cell *c, eLand l) {
|
||||||
if(c->land != l) {
|
if(c->land != l) {
|
||||||
c->landparam = 0;
|
c->landparam = 0;
|
||||||
}
|
}
|
||||||
if(l == laNone) {
|
if(l == laNone && setland_max > 0) {
|
||||||
printf("setland\n"); // NONEDEBUG
|
setland_max--;
|
||||||
|
printf("error: set land to laNone\n"); // NONEDEBUG
|
||||||
}
|
}
|
||||||
c->land = l;
|
c->land = l;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user