1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-03-25 05:59:43 +00:00

prevent stored games from having their cgi destroyed

This commit is contained in:
Zeno Rogue
2022-08-05 20:06:05 +02:00
parent 1c01cc7f94
commit 1f832faeba
2 changed files with 15 additions and 4 deletions

View File

@@ -60,8 +60,14 @@ void gamedata_all(gamedata& gd) {
gd.store(land_structure);
gd.store(*current_display);
gd.store(cgip);
if(gd.mode == 0) cgip->use_count++;
if(gd.mode != 0) cgip->use_count--;
gd.store(hybrid::underlying);
gd.store(hybrid::csteps);
if(hybri && hybrid::underlying_cgip) {
if(gd.mode == 0) hybrid::underlying_cgip->use_count++;
if(gd.mode != 0) hybrid::underlying_cgip->use_count--;
}
gd.store(hybrid::underlying_cgip);
gd.store_ptr(vid.projection_config);
gd.store_ptr(vid.rug_config);