[Freeciv-Dev] (PR#2314) Changing tech loose bulbs after load
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
[ChrisK@xxxxxxxx - Sat Nov 16 23:22:21 2002]:
> Sure. I've put pr2314.sav.gz in incoming.
Are you sure? I don't see it there.
Here is a simple fix.
jason
Index: server/savegame.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/savegame.c,v
retrieving revision 1.97
diff -u -r1.97 savegame.c
--- server/savegame.c 2002/11/14 09:15:05 1.97
+++ server/savegame.c 2002/11/16 23:51:33
@@ -621,6 +621,11 @@
plr->research.bulbs_researched=secfile_lookup_int(file,
"player%d.researched", plrno);
+ /* bulbs_researched_before defaults to 0 to preserve compatability with
+ old saved games. */
+ plr->research.bulbs_researched_before =
+ secfile_lookup_int_default(file, 0,
+ "player%d.researched_before", plrno);
plr->research.techs_researched=secfile_lookup_int(file,
"player%d.researchpoints", plrno);
plr->research.researching=secfile_lookup_int(file,
@@ -1257,6 +1262,8 @@
secfile_insert_int(file, plr->research.bulbs_researched,
"player%d.researched", plrno);
+ secfile_insert_int(file, plr->research.bulbs_researched_before,
+ "player%d.researched_before", plrno);
secfile_insert_int(file, plr->research.techs_researched,
"player%d.researchpoints", plrno);
secfile_insert_int(file, plr->research.researching,
|
|