K 10
svn:author
V 8
wsimpson
K 8
svn:date
V 27
2008-03-10T05:36:47.267036Z
K 7
svn:log
V 2423
(PR#40121) vestigial city_map removal from server

common/city.h
  city_tile_iterate_skip_free_cxy()
    useful iterator taken from common/aicore/cm.c (renamed), now used in 
    server/citytools.c and server/cityturn.c, too.
  
common/aicore/cm.c
  now generates its internal city_map scratch copies with exactly the 
  same algorithm as server/citytools.c and server/savegame.c
  
server/citytools.[ch]
  city_freeze_workers_queue()
  city_thaw_workers_queue()
    useful feature taken from ai/aicity.c (renamed).

  send_city_suppression()
    useful feature taken from server/srv_main.c, renamed to match
    send_tile_suppression().

  city_map_update()
  city_map_update_adjacent()
  city_map_update_tile()
  city_map_update_tile_cxy()
  city_map_update_tile_near_city()
  city_map_update_tile_near_city_for_player()
    Removed.  No longer recursively searching for adjacent cities to
    update each city_map[], greatly improving efficiency!

  city_map_update_tile_direct()
    Replaces city_map_update_tile_cxy(), using tile_worked() to
    efficiently update affected cities.

  city_map_update_tile_frozen()
    use city_freeze_workers_queue()

  city_map_update_tile_now()
    does auto_arrange_workers() immediately.

  city_map_update_all()
    use city_tile_iterate_skip_free_cxy()

  city_map_update_all_cities_for_player()
    freeze each city, somewhat improving efficiency.

server/cityturn.c
  apply_cmresult_to_city()
  auto_arrange_workers()
  city_increase_size()
    rely only on the cm_result and main tile map.
    use city_tile_iterate_skip_free_cxy()

server/maphand.[ch]
  map_change_ownership()
    Removed.  No longer exhaustively searching player cities to
    update each city_map[], significantly improving efficiency.

  map_clear_border()
    When removing or transfering a city, earlier border versions could
    leave an unsightly ring of old border that wasn't cleaned up by
    map_calculate_borders() until a future turn.  Removes the ring,
    allowing cities to (potentially) work the tiles.

server/sanitycheck.c
  real_sanity_check_city()
    Divided into 3 internal parts:
      check_city_good()
      check_city_map() -- not used here
      check_city_size()

  real_sanity_check_city_all()
    does check_city_map(), too.

server/savegame.c
  city_map used only internally for game_load() checking and repair.
  freeze each city, potentially improving repair efficiency.
  
END
