diff --git a/freeciv/apply_patches.sh b/freeciv/apply_patches.sh index 5c4eac2f8..b3fd5fe03 100755 --- a/freeciv/apply_patches.sh +++ b/freeciv/apply_patches.sh @@ -6,9 +6,6 @@ # https://osdn.net/projects/freeciv/ticket/????? # https://redmine.freeciv.org/issues/??? # -# 0048-Handle-CoastStrict-units-correctly-on-city-removal.patch -# Fix to unit placement after city destruction -# RM #525 # 0061-savegame-Correct-loading-last-turn-change-time.patch # Savegame loading fix # RM #545 @@ -62,7 +59,6 @@ declare -a GIT_PATCHLIST=( ) declare -a PATCHLIST=( - "backports/0048-Handle-CoastStrict-units-correctly-on-city-removal" "backports/0061-savegame-Correct-loading-last-turn-change-time" "backports/0073-savecompat-Fix-adding-ACTION_NONE-actions-for-units-" "backports/0089-Meson-Make-fc_client_common-to-depend-on-verhdr" diff --git a/freeciv/patches/backports/0048-Handle-CoastStrict-units-correctly-on-city-removal.patch b/freeciv/patches/backports/0048-Handle-CoastStrict-units-correctly-on-city-removal.patch deleted file mode 100644 index 40043e590..000000000 --- a/freeciv/patches/backports/0048-Handle-CoastStrict-units-correctly-on-city-removal.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 89783a69caa289e5300ef7f49fe3d0678d170464 Mon Sep 17 00:00:00 2001 -From: Marko Lindqvist -Date: Thu, 2 May 2024 19:46:44 +0300 -Subject: [PATCH 48/49] Handle CoastStrict units correctly on city removal - -See RM #525 - -Signed-off-by: Marko Lindqvist ---- - server/citytools.c | 17 +++++++++++------ - 1 file changed, 11 insertions(+), 6 deletions(-) - -diff --git a/server/citytools.c b/server/citytools.c -index 24fc2bad71..efe6df6691 100644 ---- a/server/citytools.c -+++ b/server/citytools.c -@@ -1710,6 +1710,7 @@ void remove_city(struct city *pcity) - struct dbv tile_processed; - struct tile_list *process_queue; - const char *ctl = city_tile_link(pcity); -+ const struct civ_map *nmap = &(wld.map); - - CALL_PLR_AI_FUNC(city_lost, powner, powner, pcity); - CALL_FUNC_EACH_AI(city_destroyed, pcity); -@@ -1742,19 +1743,23 @@ void remove_city(struct city *pcity) - bool moved; - const struct unit_type *punittype = unit_type_get(punit); - -- if (is_native_tile(punittype, pcenter)) { -+ /* can_exist_at_tile() would give wrong results, as -+ * the city is still on map. */ -+ if (is_native_tile(punittype, pcenter) -+ && (!utype_has_flag(punittype, UTYF_COAST_STRICT) -+ || is_safe_ocean(nmap, pcenter))) { - continue; - } - - unit_activity_handling(punit, ACTIVITY_IDLE, ACTION_NONE); - moved = FALSE; -- adjc_iterate(&(wld.map), pcenter, tile1) { -+ adjc_iterate(nmap, pcenter, tile1) { - struct unit *ptrans; - -- if (!moved && is_native_tile(punittype, tile1)) { -+ if (!moved && can_exist_at_tile(nmap, punittype, tile1)) { - if (adv_could_unit_move_to_tile(punit, tile1) == 1) { - /* Move */ -- if (!can_unit_survive_at_tile(&(wld.map), punit, tile1)) { -+ if (!can_unit_survive_at_tile(nmap, punit, tile1)) { - /* It may be impossible to survive at the tile even if it is - * native. See UTYF_COAST_STRICT */ - ptrans = transporter_for_unit_at(punit, tile1); -@@ -1798,7 +1803,7 @@ void remove_city(struct city *pcity) - - tile_list_pop_front(process_queue); - dbv_set(&tile_processed, tile_index(ptile)); -- adjc_iterate(&(wld.map), ptile, piter) { -+ adjc_iterate(nmap, ptile, piter) { - struct city *other_city; - - if (dbv_isset(&tile_processed, tile_index(piter))) { -@@ -1814,7 +1819,7 @@ void remove_city(struct city *pcity) - - if (!uclass_has_flag(pclass, UCF_BUILD_ANYWHERE) - && !is_native_tile(punit->utype, piter) -- && !is_city_channel_tile(&(wld.map), pclass, piter, pcenter)) { -+ && !is_city_channel_tile(nmap, pclass, piter, pcenter)) { - notify_player(unit_owner(punit), unit_tile(punit), - E_UNIT_LOST_MISC, ftc_server, - _("When %s was disbanded your %s in %s was trapped, " --- -2.43.0 - diff --git a/freeciv/version.txt b/freeciv/version.txt index 4af495801..9372b3429 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=342fd98f209c0a4490b368ffc5156b9ef093af34 +FCREV=e30c986c070fb8ac2c415e15300f44aa1a5ce20f -ORIGCAPSTR="+Freeciv.Devel-\${MAIN_VERSION}-2024.May.11" +ORIGCAPSTR="+Freeciv.Devel-\${MAIN_VERSION}-2024.May.13" # There's no need to bump this constantly as current freeciv-web # makes no connections to outside world - all connections are