some fixup

This commit is contained in:
Zeno Rogue 2019-09-28 15:06:08 +02:00
parent 7528acfb23
commit 2d6ce7c2dc
1 changed files with 6 additions and 5 deletions

View File

@ -365,7 +365,8 @@ EX void make_bounded_track(cell *s) {
println(hlog, "cls = ", isize(cl.lst)); println(hlog, "cls = ", isize(cl.lst));
for(cell *c: cl.lst) { for(cell *c: cl.lst) {
c->item = itNone; c->wall = waNone; c->monst = moNone; c->item = itNone; c->monst = moNone;
if(c->land != laAsteroids) c->wall = waNone;
} }
map<cell*, int> mazetype; map<cell*, int> mazetype;
@ -389,7 +390,7 @@ EX void make_bounded_track(cell *s) {
if(p.second == 2) to_block.push_back(p.first); if(p.second == 2) to_block.push_back(p.first);
} }
block_cells(to_block, [] (cell *c) { return true; }); block_cells(to_block, [] (cell *c) { return true; });
for(cell *c: to_block) if(c->wall == waNone && !c->monst) c->wall = waBarrier; for(cell *c: to_block) if(among(c->wall, waNone, waInvisibleFloor) && !c->monst) c->wall = waBarrier;
} }
EX bool bounded_track; EX bool bounded_track;
@ -607,9 +608,9 @@ EX void generate_track() {
} }
if(!goal) { if(!goal) {
printf("error: goal unreachable\n"); printf("error: goal unreachable\n");
// gamegen_failure = true; gamegen_failure = true;
// race_try++; race_try++;
// return; return;
} }
} }