From 6d72bd820b9b9bb7fa2ee14c2acda622abede5c1 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 8 Mar 2019 22:42:14 +0100 Subject: [PATCH] 3d:: extra_generation_distance (todo: make it configurable from menus) --- hyper.h | 3 +++ hypgraph.cpp | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/hyper.h b/hyper.h index 69ebd7de..36e1a21d 100644 --- a/hyper.h +++ b/hyper.h @@ -4918,5 +4918,8 @@ bool normal_gravity_at(cell *c); void build_pool(cell *c, bool with_boat); void createArrowTrapAt(cell *c, eLand land); bool no_barriers_in_radius(cell *c, int rad); + +extern ld extra_generation_distance; + } diff --git a/hypgraph.cpp b/hypgraph.cpp index 1ef349ed..d780c105 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -1548,11 +1548,13 @@ bool do_draw(cell *c) { return true; } +ld extra_generation_distance = 99; + bool do_draw(cell *c, const transmatrix& T) { if(DIM == 3) { - if(hyperbolic && T[DIM][DIM] > cosh(sightranges[geometry])) return false; - if(euclid && hypot_d(3, tC0(T)) > sightranges[geometry]) return false; - setdist(c, 7, c); + ld dist = hdist0(tC0(T)); + if(dist > sightranges[geometry]) return false; + if(dist <= extra_generation_distance) setdist(c, 7, c); return true; }