alt_BARLEV and alt_distlimit

This commit is contained in:
Zeno Rogue
2026-09-17 09:37:51 +02:00
parent 2c43ef816e
commit 32c4b66713
3 changed files with 15 additions and 1 deletions
+3
View File
@@ -1790,7 +1790,10 @@ EX int auto_compute_range(cell *c) {
return ginf[geometry].distlimit[0] = cgi.base_distlimit = d;
}
EX int alt_distlimit = UNKNOWN;
EX int getDistLimit() {
if(alt_distlimit != UNKNOWN) return alt_distlimit;
auto& res = cgi.base_distlimit;
if(res) return res;
if(arb::in() && arb::current.range)
+1 -1
View File
@@ -573,7 +573,7 @@ typedef function<int(struct cell*)> cellfunction;
#define INFD 60
#define PINFD 125
#ifndef BARLEV
#define BARLEV ((ISANDROID||ISIOS||ISFAKEMOBILE||getDistLimit()<7)?(getDistLimit()<4?8:9):10)
#define BARLEV hr::get_BARLEV()
#endif
#define BUGLEV 15
// #define BARLEV 9
+11
View File
@@ -16,6 +16,17 @@ EX int explore[10], exploreland[10][landtypes], landcount[landtypes];
EX bool safety = false;
EX int alt_BARLEV;
EX int get_BARLEV() {
if(alt_BARLEV) return alt_BARLEV;
int d = getDistLimit();
bool lowmem = ISANDROID||ISIOS||ISFAKEMOBILE;
if(d<4) return 8;
if(lowmem || d < 7) return 9;
return 10;
}
EX eLand lastland;
EX int lastexplore;