From 3e269fe05317bddd37b61cb2ec427182b0efa477 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 24 Aug 2021 12:06:17 +0200 Subject: [PATCH] rulegen:: w_near_solid --- rulegen.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rulegen.cpp b/rulegen.cpp index 298c7bc0..6ba22461 100644 --- a/rulegen.cpp +++ b/rulegen.cpp @@ -59,7 +59,7 @@ EX int states_premini = 0; #if HDR /** change some flags -- they usually make it worse */ static const flagtype w_numerical = Flag(1); /*< build trees numerically */ -static const flagtype w_single_shortcut = Flag(2); /*< generate just one shortcut */ +static const flagtype w_near_solid = Flag(2); /*< solid's pre-parent is also solid */ static const flagtype w_no_shortcut = Flag(3); /*< generate no shortcuts */ static const flagtype w_no_restart = Flag(4); /*< do not restart at powers of two */ static const flagtype w_no_sidecache = Flag(5); /*< do not cache get_side */ @@ -568,6 +568,8 @@ void be_solid(tcell *c) { throw rulegen_failure("set solid but no dist"); } c->is_solid = true; + if(c->dist > 0 && !(flags & w_near_solid)) + be_solid(c->move(c->any_nearer)); } EX void look_for_shortcuts(tcell *c, shortcut& sh) {