1
0
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:
Zeno Rogue 2023-12-12 20:02:53 +01:00
parent 548e2609ce
commit 24c196db15

View File

@ -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;
}