mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-23 15:36:59 +00:00
map no longer disappears suddenly and irreparably if you scroll into the invisible region
This commit is contained in:
parent
f9b03013c1
commit
70bfe718ef
1
cell.cpp
1
cell.cpp
@ -1486,6 +1486,7 @@ void clearCellMemory() {
|
||||
allmaps.clear();
|
||||
last_cleared = NULL;
|
||||
saved_distances.clear();
|
||||
pd_from = NULL;
|
||||
}
|
||||
|
||||
auto cellhooks = addHook(clearmemory, 500, clearCellMemory);
|
||||
|
3
game.cpp
3
game.cpp
@ -2747,7 +2747,7 @@ cell *pd_from;
|
||||
int pd_range;
|
||||
|
||||
void compute_graphical_distance() {
|
||||
cell *c1 = centerover.c ? centerover.c : cwt.c;
|
||||
cell *c1 = centerover.c ? centerover.c : pd_from ? pd_from : cwt.c;
|
||||
int sr = get_sightrange_ambush();
|
||||
if(pd_from == c1 && pd_range == sr) return;
|
||||
for(auto c: pathq) c->pathdist = PINFD;
|
||||
@ -2761,6 +2761,7 @@ void compute_graphical_distance() {
|
||||
for(int qb=0; qb<size(pathq); qb++) {
|
||||
cell *c = pathq[qb];
|
||||
if(c->pathdist == pd_range) break;
|
||||
if(qb == 0) forCellCM(c1, c) ;
|
||||
forCellEx(c1, c)
|
||||
if(c1->pathdist == PINFD)
|
||||
c1->pathdist = c->pathdist + 1,
|
||||
|
Loading…
Reference in New Issue
Block a user