mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-18 19:24:48 +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));
|
||||
}
|
||||
|
||||
EX int setland_max = 5;
|
||||
|
||||
EX void setland(cell *c, eLand l) {
|
||||
if(c->land != l) {
|
||||
c->landparam = 0;
|
||||
}
|
||||
if(l == laNone) {
|
||||
printf("setland\n"); // NONEDEBUG
|
||||
if(l == laNone && setland_max > 0) {
|
||||
setland_max--;
|
||||
printf("error: set land to laNone\n"); // NONEDEBUG
|
||||
}
|
||||
c->land = l;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user