Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2006:
[Freeciv-Dev] Re: (PR#10359) Saving changes game state
Home

[Freeciv-Dev] Re: (PR#10359) Saving changes game state

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: marko.lindqvist@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#10359) Saving changes game state
From: "Marko Lindqvist" <cazfi74@xxxxxxxxx>
Date: Mon, 24 Jul 2006 05:30:58 -0700
Reply-to: bugs@xxxxxxxxxxx

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

Marko Lindqvist wrote:
> 
>   Problem found.
>   Autosettler founds city from hut. Infrastructure cache for this new 
> city is not immediately initialized. Another autosettler tries to use cache.

  And fix


  - ML

diff -Nurd -X.diff_ignore freeciv/server/unittools.c freeciv/server/unittools.c
--- freeciv/server/unittools.c  2006-07-24 13:27:04.718750000 +0300
+++ freeciv/server/unittools.c  2006-07-24 15:21:10.671875000 +0300
@@ -2243,6 +2243,12 @@
                     _("You found a friendly city."));
     create_city(pplayer, punit->tile,
                city_name_suggestion(pplayer, punit->tile));
+
+    if (unit_flag(punit, F_CITIES) || unit_flag(punit, F_SETTLERS)) {
+      /* In case city was found during autosettler activities */
+      initialize_infrastructure_cache(pplayer);
+    }
+
   } else {
     notify_player(pplayer, punit->tile, E_HUT_SETTLER,
                     _("Friendly nomads are impressed by you,"

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