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

fixed minimize_rules() not updating id's

This commit is contained in:
Zeno Rogue 2021-07-30 03:50:29 +02:00
parent 872587d156
commit c8cbe55e1f

View File

@ -812,6 +812,7 @@ void minimize_rules() {
for(int i=0; i<next_id; i++) if(old_id[new_id[i]] == -1) old_id[new_id[i]] = i;
for(int i=0; i<new_ids; i++) treestates[i] = treestates[old_id[i]];
for(int i=0; i<new_ids; i++) treestates[i].id = i;
treestates.resize(new_ids);
for(auto& ts: treestates) {
for(auto& r: ts.rules)