Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2005:
[Freeciv-Dev] (PR#13910) A_UNSET isn't used
Home

[Freeciv-Dev] (PR#13910) A_UNSET isn't used

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#13910) A_UNSET isn't used
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Wed, 7 Sep 2005 01:42:52 -0700
Reply-to: bugs@xxxxxxxxxxx

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

> [jdorje - Wed Sep 07 08:23:01 2005]:
> 
> When I finish researching the target and there is no goal set, the new 
> research target is supposed to be changed to unset.
> 
> Instead, in the development version the server picks another tech for me 
> to research.
> 
> -jason
> 
Your patch in #13385 in update_tech():
 
+  /* At the end of the turn an unset tech target will lead to one being
+   * picked randomly.  You can't save bulbs over between turns. */
+  if (research->researching == A_UNSET) {
+    choose_random_tech(plr);
+  }
+  assert(research->researching != A_UNSET);

The server basically interates over cities and increases
bulbs_researched, when bulbs_researched >= total_bulbs_required it call
tech_researched, which changes the value of target to UNSET if there's
no goal. However if there is at least one city with positive science to
iterate over then a tech will be choosen randomly in update_tech().

I suggest reverting that part of 13385.
--
mateusz



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