Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] (PR#2314) Changing tech loose bulbs after load
Home

[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]
To: ChrisK@xxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#2314) Changing tech loose bulbs after load
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Sat, 16 Nov 2002 15:54:02 -0800
Reply-to: rt@xxxxxxxxxxxxxx

[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,

[Prev in Thread] Current Thread [Next in Thread]