1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-20 03:54:47 +00:00

rulegen:: fixed cleanups

This commit is contained in:
Zeno Rogue 2021-12-28 11:38:45 +01:00
parent 410d5c3015
commit 9787b3e52d

View File

@ -1655,11 +1655,6 @@ bool need_clear_codes;
void clear_codes() {
need_clear_codes = false;
auto c = first_tcell;
while(c) {
c->code = MYSTERY;
c = c->next;
}
for(auto a: all_analyzers) {
for(auto tw: a->inhabitants) tw.at->code = MYSTERY_LARGE;
a->inhabitants.clear();
@ -1688,6 +1683,7 @@ void find_single_live_branch(twalker& at) {
}
EX void clean_analyzers() {
for(auto a: all_analyzers) for(auto tw: a->inhabitants) tw.at->code = MYSTERY_LARGE;
for(auto a: all_analyzers) delete a;
for(auto& av: analyzers) for(auto& a: av) a = nullptr;
all_analyzers.clear();