[Freeciv-Dev] (PR#13910) A_UNSET isn't used
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<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
|
|