mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
nonisotropic range parameters now work in all perspective modes
This commit is contained in:
parent
9c603c13d4
commit
875b0159e6
@ -1420,7 +1420,7 @@ EX void edit_sightrange() {
|
||||
}
|
||||
}
|
||||
#if CAP_SOLV
|
||||
if(pmodel == mdGeodesic && sol) {
|
||||
if(models::is_perspective(pmodel) && sol) {
|
||||
dialog::addSelItem(XLAT("max difference in X/Y coordinates"), fts(sn::solrange_xy), 'x');
|
||||
dialog::add_action([] {
|
||||
dialog::editNumber(sn::solrange_xy, 0.01, 200, 0.1, 50, XLAT("max difference in X/Y coordinates"), solhelp()), dialog::scaleLog();
|
||||
@ -1431,7 +1431,7 @@ EX void edit_sightrange() {
|
||||
});
|
||||
}
|
||||
#endif
|
||||
if(pmodel == mdGeodesic && sl2) {
|
||||
if(models::is_perspective(pmodel) && sl2) {
|
||||
dialog::addSelItem(XLAT("max difference in X/Y coordinates"), fts(slr::range_xy), 'x');
|
||||
dialog::add_action([] {
|
||||
dialog::editNumber(slr::range_xy, 0, 10, 0.5, 4, XLAT("max difference in X/Y coordinates"), "");
|
||||
|
11
hypgraph.cpp
11
hypgraph.cpp
@ -2949,23 +2949,24 @@ EX bool do_draw(cell *c, const shiftmatrix& T) {
|
||||
if(cells_drawn > vid.cells_drawn_limit) return false;
|
||||
if(cells_drawn < 50) { limited_generation(c); return true; }
|
||||
#if MAXMDIM >= 4
|
||||
if(nil && pmodel == mdGeodesic) {
|
||||
if(nil && models::is_perspective(pmodel)) {
|
||||
ld dist = hypot_d(3, inverse_exp(tC0(T), pQUICK));
|
||||
if(dist > sightranges[geometry] + (vid.sloppy_3d ? 0 : 0.9)) return false;
|
||||
if(dist <= extra_generation_distance && !limited_generation(c)) return false;
|
||||
}
|
||||
else if(pmodel == mdGeodesic && sol) {
|
||||
else if(sol && models::is_perspective(pmodel)) {
|
||||
if(!nisot::in_table_range(tC0(T.T))) return false;
|
||||
if(!limited_generation(c)) return false;
|
||||
}
|
||||
else if(pmodel == mdGeodesic && nih) {
|
||||
else if(nih && models::is_perspective(pmodel)) {
|
||||
hyperpoint h = inverse_exp(tC0(T), pQUICK);
|
||||
ld dist = hypot_d(3, h);
|
||||
if(dist > sightranges[geometry] + (vid.sloppy_3d ? 0 : cgi.corner_bonus)) return false;
|
||||
if(dist <= extra_generation_distance && !limited_generation(c)) return false;
|
||||
}
|
||||
else if(pmodel == mdGeodesic && sl2) {
|
||||
if(hypot(tC0(T.T)[2], tC0(T.T)[3]) > cosh(slr::range_xy)) return false;
|
||||
else if(sl2 && models::is_perspective(pmodel)) {
|
||||
if(hypot(tC0(T.T)[2], tC0(T.T)[3]) > cosh(slr::range_xy)) return false;
|
||||
if(abs(T.shift) > (slr::range_z)) return false;
|
||||
if(abs(T.shift * stretch::not_squared()) > sightranges[geometry]) return false;
|
||||
if(!limited_generation(c)) return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user