1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-02 02:37:55 +00:00

intra:: correct cleanup of intra maps

This commit is contained in:
Zeno Rogue
2022-02-27 01:13:50 +01:00
parent 0aa338e9eb
commit 443ecf0331
2 changed files with 21 additions and 0 deletions

View File

@@ -763,6 +763,21 @@ EX void kill(int id) {
println(hlog, isize(to_remove), " connections and ", isize(to_erase_cell), " cells erased");
}
EX void erase_all_maps() {
println(hlog, "erase_all_maps called");
data[current].gd.storegame();
in = false;
for(int i=0; i<isize(data); i++) {
current = i;
ginf[gProduct] = data[i].gi;
data[i].gd.restoregame();
clearCellMemory();
}
intra_id.clear();
connections.clear();
data.clear();
}
EX set<cell*> need_to_save;
EX void prepare_need_to_save() {