Author: cazfi
Date: Thu Nov 12 22:34:43 2015
New Revision: 30576

URL: http://svn.gna.org/viewcvs/freeciv?rev=30576&view=rev
Log:
Do not refresh cities during savegame.c savegame loading when tradepartner has 
not necessarily been loaded yet.

See bug #23614

Modified:
    trunk/server/savegame.c

Modified: trunk/server/savegame.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame.c?rev=30576&r1=30575&r2=30576&view=diff
==============================================================================
--- trunk/server/savegame.c     (original)
+++ trunk/server/savegame.c     Thu Nov 12 22:34:43 2015
@@ -2636,15 +2636,7 @@
     vision_reveal_tiles(pcity->server.vision, game.server.vision_reveal_tiles);
     city_refresh_vision(pcity);
 
-    /* Refresh the city. This also checks the squared city radius. Thus, it
-     * must be after improvements, as the effect City_Radius_SQ could be
-     * influenced by improvements; and after the vision is defined, as the
-     * function calls city_refresh_vision(). */
-    city_refresh(pcity);
-
     city_list_append(plr->cities, pcity);
-
-    CALL_PLR_AI_FUNC(city_got, plr, plr, pcity);
   }
 }
 
@@ -4103,9 +4095,12 @@
     /* Update all city information.  This must come after all cities are
      * loaded (in player_load) but before player (dumb) cities are loaded
      * in player_load_vision(). */
-    cities_iterate(pcity) {
-      city_refresh_from_main_map(pcity, NULL);
-    } cities_iterate_end;
+    players_iterate(plr) {
+      city_list_iterate(plr->cities, pcity) {
+        city_refresh(pcity);
+        CALL_PLR_AI_FUNC(city_got, plr, plr, pcity);
+      } city_list_iterate_end;
+    } players_iterate_end;
 
     /* Since the cities must be placed on the map to put them on the
        player map we do this afterwards */


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to