diff --git a/cell.cpp b/cell.cpp index 5772e2ad..38ad590d 100644 --- a/cell.cpp +++ b/cell.cpp @@ -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) diff --git a/hyper.h b/hyper.h index d8fe2067..5d580d19 100644 --- a/hyper.h +++ b/hyper.h @@ -573,7 +573,7 @@ typedef function 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 diff --git a/landgen.cpp b/landgen.cpp index 860e3964..4a6e2bbc 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -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;