Ticket #43161

Savegame bulb loss bug

Open Date: 2021-11-04 10:34 Last Update: 2021-11-11 01:22

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
1

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 History (3/4 Histories)

2021-11-04 10:34 Updated by: lexxie9952
  • New Ticket "Savegame bulb loss bug" created
2021-11-05 01:53 Updated by: cazfi
  • Resolution Update from None to Accepted
  • Milestone Update from (None) to 3.0.0 (closed)
  • Component Update from (None) to Server
2021-11-11 01:22 Updated by: cazfi
  • Status Update from Open to Closed
  • Owner Update from (None) to cazfi
  • Resolution Update from Accepted to Fixed

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login