#43161: Savegame bulb loss bug Open Date: 2021-11-04 03:34 Last Update: 2021-11-04 18:53 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/43161 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=43161 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2021-11-04 18:53 Updated by: cazfi * Resolution Update from None to Accepted * Milestone Update from (None) to 3.0.0 * Component Update from (None) to Server --------------------------------------------------------------------- Ticket Status: Reporter: lexxie9952 Owner: (None) Type: Bugs Status: Open Priority: 5 - Medium MileStone: 3.0.0 Component: Server Severity: 5 - Medium Resolution: Accepted --------------------------------------------------------------------- Ticket details: When server setting multiresearch is enabled, reloading a save game will make players who just discovered a tech but did not select the next tech, lose their bulbs when they select their next tech. Blamed: presearch->got_tech_multi is not being saved in savegame. When I added it by copy pasting the same lines for the very similar bool, presearch->got_tech ... it created save game incompatibility and old save games wouldn't load However, Sveinung helped me use secfile_lookup_bool_default to work around this issue. Specifically, /* BREAKS SAVE compatibility: */ sg_failure_ret(secfile_lookup_bool(loading->file, &presearch->got_tech_multi, "research.r%d.got_tech_multi", i), "%s", secfile_error()); BREAKS SAVECOMPAT */ /* WORKS */ presearch->got_tech_multi = secfile_lookup_bool_default(loading->file, FALSE, "research.r%d.got_tech_multi", i); -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/43161 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=43161