Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2005:
[Freeciv-Dev] (PR#13198) Changin Tech when goal is changed
Home

[Freeciv-Dev] (PR#13198) Changin Tech when goal is changed

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: lists@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#13198) Changin Tech when goal is changed
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 7 Jun 2005 20:32:44 -0700
Reply-to: bugs@xxxxxxxxxxx

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

I believe this is a better fix.  However I haven't tested it.  Having a
savegame for testing would be helpful.

-jason

Index: server/plrhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/plrhand.c,v
retrieving revision 1.384
diff -u -r1.384 plrhand.c
--- server/plrhand.c    7 Jun 2005 06:20:06 -0000       1.384
+++ server/plrhand.c    8 Jun 2005 03:30:18 -0000
@@ -582,16 +582,13 @@
 {
   int chosen, researchable = 0;
 
-  if (plr->research->bulbs_researched >0) {
-    plr->research->bulbs_researched = 0;
-  }
   tech_type_iterate(i) {
     if (get_invention(plr, i) == TECH_REACHABLE) {
       researchable++;
     }
   } tech_type_iterate_end;
   if (researchable == 0) {
-    plr->research->researching = A_FUTURE;
+    choose_tech(plr, A_FUTURE);
     return;
   }
   chosen = myrand(researchable) + 1;
@@ -600,7 +597,7 @@
     if (get_invention(plr, i) == TECH_REACHABLE) {
       chosen--;
       if (chosen == 0) {
-       plr->research->researching = i;
+       choose_tech(plr, i);
        break;
       }
     }

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