1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-23 16:50:27 +00:00

3d:: extra_generation_distance (todo: make it configurable from menus)

This commit is contained in:
Zeno Rogue 2019-03-08 22:42:14 +01:00
parent 5e237d5a59
commit 6d72bd820b
2 changed files with 8 additions and 3 deletions

View File

@ -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;
}

View File

@ -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;
}