From 24c196db1598d4e1b1fc9ab7ac7ffb93257a51bc Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 12 Dec 2023 20:02:53 +0100 Subject: [PATCH] limit setland errors --- barriers.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/barriers.cpp b/barriers.cpp index 349da973..a8e5311c 100644 --- a/barriers.cpp +++ b/barriers.cpp @@ -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; }