mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 01:00:25 +00:00
3d:: extra_generation_distance (todo: make it configurable from menus)
This commit is contained in:
parent
5e237d5a59
commit
6d72bd820b
3
hyper.h
3
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;
|
||||
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user