From e3440b323abca920c258f6c4e333f4be77cf70d9 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 10 Feb 2025 09:44:08 +0100 Subject: [PATCH] rogueviz::ads:: fix to Gate Jungle --- rogueviz/ads/map.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/rogueviz/ads/map.cpp b/rogueviz/ads/map.cpp index 16b71d0e..cd155390 100644 --- a/rogueviz/ads/map.cpp +++ b/rogueviz/ads/map.cpp @@ -90,12 +90,16 @@ void gen_terrain(cell *c, cellinfo& ci, int level = 0) { if(ci_at[c2].type < wtSolid) ci_at[c2].type = wtSolid; } - r = hrand(100); - if(r < gate_frequency(c)) - ci_at[c].type = wtGate; } ci.mpd_terrain = level; + auto gf = gate_frequency(c); + if(gf) { + int r = hrand(100); + if(r < gf) + ci_at[c].type = wtGate; + } + if(c->land == laBarrier) ci_at[c].type = wtBarrier; }