From e567b61cf4a9a06d84859aa288f1a0addea9043a Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 2 Nov 2024 07:28:14 +0200 Subject: [PATCH] Update to Freeciv server freeciv/freeciv@a3da3434b5 Signed-off-by: Marko Lindqvist --- freeciv/apply_patches.sh | 4 - ...map_init_topology-Operate-on-any-map.patch | 176 ------------------ freeciv/version.txt | 4 +- 3 files changed, 2 insertions(+), 182 deletions(-) delete mode 100644 freeciv/patches/backports/0038-map_init_topology-Operate-on-any-map.patch diff --git a/freeciv/apply_patches.sh b/freeciv/apply_patches.sh index e88de38b2..a9814607f 100755 --- a/freeciv/apply_patches.sh +++ b/freeciv/apply_patches.sh @@ -9,9 +9,6 @@ # 0068-AI-Remove-shared-vision-from-pending-war-target-once.patch # AI assert fix # RM #701 -# 0038-map_init_topology-Operate-on-any-map.patch -# Dependency of 0030-Tex-Initialize-map-topology.patch -# RM #707 # 0030-Tex-Initialize-map-topology.patch # Tex AI map topology fix # RM #663 @@ -42,7 +39,6 @@ declare -a GIT_PATCHLIST=( declare -a PATCHLIST=( "backports/0068-AI-Remove-shared-vision-from-pending-war-target-once" - "backports/0038-map_init_topology-Operate-on-any-map" "backports/0030-Tex-Initialize-map-topology" "backports/0046-Fix-combat-veterancy-chance" "backports/0048-Make-action-selection-dialog-to-appear-on-airlift" diff --git a/freeciv/patches/backports/0038-map_init_topology-Operate-on-any-map.patch b/freeciv/patches/backports/0038-map_init_topology-Operate-on-any-map.patch deleted file mode 100644 index 2f4c35274..000000000 --- a/freeciv/patches/backports/0038-map_init_topology-Operate-on-any-map.patch +++ /dev/null @@ -1,176 +0,0 @@ -From 03af55537a12e1b76012c807a8843f028884d149 Mon Sep 17 00:00:00 2001 -From: Marko Lindqvist -Date: Sat, 8 Jun 2024 20:14:33 +0300 -Subject: [PATCH 38/39] map_init_topology(): Operate on any map - -Take map as parameter, instead of assuming main map. - -Requested by Alina Lenk - -See RM #707 - -Signed-off-by: Marko Lindqvist ---- - client/packhand.c | 2 +- - common/map.c | 20 ++++++++++---------- - common/map.h | 2 +- - server/generator/mapgen_topology.c | 10 +++++----- - server/savegame/savegame2.c | 2 +- - server/savegame/savegame3.c | 2 +- - 6 files changed, 19 insertions(+), 19 deletions(-) - -diff --git a/client/packhand.c b/client/packhand.c -index 879f2b77e9..1a6f847a96 100644 ---- a/client/packhand.c -+++ b/client/packhand.c -@@ -2259,7 +2259,7 @@ void handle_map_info(const struct packet_map_info *packet) - wld.map.topology_id = packet->topology_id; - wld.map.wrap_id = packet->wrap_id; - -- map_init_topology(); -+ map_init_topology(&(wld.map)); - main_map_allocate(); - client_player_maps_reset(); - init_client_goto(); -diff --git a/common/map.c b/common/map.c -index 963faf509e..664b2b66ca 100644 ---- a/common/map.c -+++ b/common/map.c -@@ -164,7 +164,7 @@ void map_init(struct civ_map *imap, bool server_side) - imap->startpos_table = nullptr; - imap->iterate_outwards_indices = nullptr; - -- /* The [xy]size values are set in map_init_topology. It is initialized -+ /* The [xy]size values are set in map_init_topology(). It is initialized - * to a non-zero value because some places erroneously use these values - * before they're initialized. */ - imap->xsize = MAP_DEFAULT_LINEAR_SIZE; -@@ -312,7 +312,7 @@ static void generate_map_indices(void) - This is done by the map generator code (server), when loading a savegame - or a scenario with map (server), and packhand code (client). - ***********************************************************************/ --void map_init_topology(void) -+void map_init_topology(struct civ_map *nmap) - { - enum direction8 dir; - -@@ -328,7 +328,7 @@ void map_init_topology(void) - fc_assert(map_num_tiles() >= MAP_MIN_SIZE * 1000); - fc_assert(map_num_tiles() <= MAP_MAX_SIZE * 1000); - -- wld.map.num_valid_dirs = wld.map.num_cardinal_dirs = 0; -+ nmap->num_valid_dirs = nmap->num_cardinal_dirs = 0; - - /* Values for direction8_invalid() */ - fc_assert(direction8_invalid() == 8); -@@ -338,23 +338,23 @@ void map_init_topology(void) - /* Values for actual directions */ - for (dir = 0; dir < 8; dir++) { - if (is_valid_dir_calculate(dir)) { -- wld.map.valid_dirs[wld.map.num_valid_dirs] = dir; -- wld.map.num_valid_dirs++; -+ nmap->valid_dirs[nmap->num_valid_dirs] = dir; -+ nmap->num_valid_dirs++; - dir_validity[dir] = TRUE; - } else { - dir_validity[dir] = FALSE; - } - if (is_cardinal_dir_calculate(dir)) { -- wld.map.cardinal_dirs[wld.map.num_cardinal_dirs] = dir; -- wld.map.num_cardinal_dirs++; -+ nmap->cardinal_dirs[nmap->num_cardinal_dirs] = dir; -+ nmap->num_cardinal_dirs++; - dir_cardinality[dir] = TRUE; - } else { - dir_cardinality[dir] = FALSE; - } - } -- fc_assert(wld.map.num_valid_dirs > 0 && wld.map.num_valid_dirs <= 8); -- fc_assert(wld.map.num_cardinal_dirs > 0 -- && wld.map.num_cardinal_dirs <= wld.map.num_valid_dirs); -+ fc_assert(nmap->num_valid_dirs > 0 && nmap->num_valid_dirs <= 8); -+ fc_assert(nmap->num_cardinal_dirs > 0 -+ && nmap->num_cardinal_dirs <= nmap->num_valid_dirs); - } - - /*******************************************************************//** -diff --git a/common/map.h b/common/map.h -index 338dbcb36f..18804f1c15 100644 ---- a/common/map.h -+++ b/common/map.h -@@ -49,7 +49,7 @@ static const bool C_PERCENT = TRUE; - - bool map_is_empty(void); - void map_init(struct civ_map *imap, bool server_side); --void map_init_topology(void); -+void map_init_topology(struct civ_map *nmap); - void map_allocate(struct civ_map *amap); - void main_map_allocate(void); - void map_free(struct civ_map *fmap, bool server_side); -diff --git a/server/generator/mapgen_topology.c b/server/generator/mapgen_topology.c -index 8ba29db74b..38b904abc0 100644 ---- a/server/generator/mapgen_topology.c -+++ b/server/generator/mapgen_topology.c -@@ -226,20 +226,20 @@ void generator_init_topology(bool autosize) - - sqsize = get_sqsize(); - -- /* initialize the ICE_BASE_LEVEL */ -+ /* Initialize the ICE_BASE_LEVEL */ - -- /* if maps has strip like poles we get smaller poles -+ /* If maps has strip like poles we get smaller poles - * (less playables than island poles) - * 5% for little maps - * 2% for big ones, if map.server.temperature == 50 - * except if separate poles is set */ - if (wld.map.server.separatepoles) { -- /* with separatepoles option strip poles are useless */ -+ /* With separatepoles option strip poles are useless */ - ice_base_colatitude = - (MAX(0, 100 * COLD_LEVEL / 3 - 1 * MAX_COLATITUDE) - + 1 * MAX_COLATITUDE * sqsize) / (100 * sqsize); - } else { -- /* any way strip poles are not so playable as isle poles */ -+ /* Any way strip poles are not so playable as isle poles */ - ice_base_colatitude = - (MAX(0, 100 * COLD_LEVEL / 3 - 2 * MAX_COLATITUDE) - + 2 * MAX_COLATITUDE * sqsize) / (100 * sqsize); -@@ -262,7 +262,7 @@ void generator_init_topology(bool autosize) - wld.map.server.huts_absolute = -1; - } - -- map_init_topology(); -+ map_init_topology(&(wld.map)); - } - - /************************************************************************//** -diff --git a/server/savegame/savegame2.c b/server/savegame/savegame2.c -index e752b790ca..97792a6a92 100644 ---- a/server/savegame/savegame2.c -+++ b/server/savegame/savegame2.c -@@ -2261,7 +2261,7 @@ static void sg_load_map_tiles(struct loaddata *loading) - - /* Initialize the map for the current topology. 'map.xsize' and - * 'map.ysize' must be set. */ -- map_init_topology(); -+ map_init_topology(&(wld.map)); - - /* Allocate map. */ - main_map_allocate(); -diff --git a/server/savegame/savegame3.c b/server/savegame/savegame3.c -index ee1d62cff3..00cfbaffe6 100644 ---- a/server/savegame/savegame3.c -+++ b/server/savegame/savegame3.c -@@ -2922,7 +2922,7 @@ static void sg_load_map_tiles(struct loaddata *loading) - - /* Initialize the map for the current topology. 'map.xsize' and - * 'map.ysize' must be set. */ -- map_init_topology(); -+ map_init_topology(&(wld.map)); - - /* Allocate map. */ - main_map_allocate(); --- -2.43.0 - diff --git a/freeciv/version.txt b/freeciv/version.txt index 471177041..dea3d3a6f 100644 --- a/freeciv/version.txt +++ b/freeciv/version.txt @@ -1,9 +1,9 @@ # The Git SHA hash for the commit to checkout from # https://github.com/freeciv/freeciv -FCREV=c1c9cad310fc81c7e3a5d6880464d6cd6a56f0e6 +FCREV=a3da3434b58a0d9a690b12b0a8a160b1d017147a -ORIGCAPSTR="+Freeciv.Devel-\${MAIN_VERSION}-2024.June.04h" +ORIGCAPSTR="+Freeciv.Devel-\${MAIN_VERSION}-2024.June.08" # There's no need to bump this constantly as current freeciv-web # makes no connections to outside world - all connections are