1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-06 08:43:02 +00:00

fixup to distlimit

This commit is contained in:
Zeno Rogue
2025-05-11 12:39:12 +02:00
parent bcb232b191
commit 5a0931bb3c
4 changed files with 30 additions and 18 deletions

View File

@@ -476,15 +476,17 @@ bool step(int delta) {
return false;
}
EX ld compute_scale() {
return sqrt(isize(cells_of_heptagon) * 1. / isize(cells));
}
EX void compute_geometry() {
if(IRREGULAR) {
ld scale = sqrt(isize(cells_of_heptagon) * 1. / isize(cells));
ld scale = compute_scale();
cgi.crossf *= scale;
cgi.rhexf *= scale;
cgi.hexhexdist *= scale;
cgi.hexvdist *= scale;
cgi.base_distlimit = (cgi.base_distlimit + log(scale) / log(2.618)) / scale;
if(cgi.base_distlimit > 25) cgi.base_distlimit = 25;
}
}