Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2005:
[Freeciv-Dev] (PR#12294) tech bug in S2
Home

[Freeciv-Dev] (PR#12294) tech bug in S2

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#12294) tech bug in S2
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Sun, 21 Aug 2005 01:24:36 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12294 >

The patch looks good.
Updated patches are attached. This should be commited before 2.0.5.
--
mateusz 
Index: server/techtools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/techtools.c,v
retrieving revision 1.18
diff -u -r1.18 techtools.c
--- server/techtools.c  18 Aug 2005 06:44:29 -0000      1.18
+++ server/techtools.c  21 Aug 2005 08:22:45 -0000
@@ -290,7 +290,11 @@
         || tech_found == A_FUTURE);
   assert(tech_is_available(plr, tech_found) || tech_found == A_FUTURE);
 
-  research->got_tech = TRUE;
+  /* got_tech allows us to change research without applying techpenalty
+   * (without loosing bulbs) */
+  if (tech_found == research->researching) {
+    research->got_tech = TRUE;
+  }
   research->changed_from = -1;
   research->techs_researched++;
   was_first = (!game.info.global_advances[tech_found]);
Index: server/plrhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/plrhand.c,v
retrieving revision 1.330.2.31
diff -u -r1.330.2.31 plrhand.c
--- server/plrhand.c    6 Jul 2005 08:17:33 -0000       1.330.2.31
+++ server/plrhand.c    21 Aug 2005 08:22:33 -0000
@@ -286,7 +286,12 @@
         || tech_found == A_FUTURE);
   assert(tech_is_available(plr, tech_found) || tech_found == A_FUTURE);
 
-  plr->got_tech = TRUE;
+  /* got_tech allows us to change research without applying techpenalty
+   * (without loosing bulbs) */
+  if (tech_found == plr->research.researching) {
+    plr->got_tech = TRUE;
+  }
+
   plr->research.changed_from = -1;
   plr->research.techs_researched++;
   was_first = (game.global_advances[tech_found] == 0);

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12294) tech bug in S2, Mateusz Stefek <=