1
0
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:
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)); 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;
} }