diff --git a/freeciv-web/src/main/webapp/javascript/fc_types.js b/freeciv-web/src/main/webapp/javascript/fc_types.js index 64f1df032..1f35b5fb5 100644 --- a/freeciv-web/src/main/webapp/javascript/fc_types.js +++ b/freeciv-web/src/main/webapp/javascript/fc_types.js @@ -262,12 +262,16 @@ var ACTION_SPY_ESCAPE = 107; var ACTION_UNIT_MOVE = 108; var ACTION_UNIT_MOVE2 = 109; var ACTION_UNIT_MOVE3 = 110; -var ACTION_CLEAN = 111; -var ACTION_USER_ACTION1 = 112; -var ACTION_USER_ACTION2 = 113; -var ACTION_USER_ACTION3 = 114; -var ACTION_USER_ACTION4 = 115; -var ACTION_COUNT = 116; +var ACTION_TELEPORT = 111; +var ACTION_TELEPORT2 = 112; +var ACTION_TELEPORT3 = 113; +var ACTION_CLEAN = 114; +var ACTION_GAIN_VETERANCY = 115; +var ACTION_USER_ACTION1 = 116; +var ACTION_USER_ACTION2 = 117; +var ACTION_USER_ACTION3 = 118; +var ACTION_USER_ACTION4 = 119; +var ACTION_COUNT = 120; /* The action_decision enum */ /* Doesn't need the player to decide what action to take. */ diff --git a/freeciv/apply_patches.sh b/freeciv/apply_patches.sh index 36a84b4cf..bede672e4 100755 --- a/freeciv/apply_patches.sh +++ b/freeciv/apply_patches.sh @@ -35,6 +35,9 @@ # 0050-Cache-territory-claiming-base-types.patch # Performance improvement # osdn #47345 +# 0050-Correct-filling-of-territory-claiming-extras-cache.patch +# Fix terr claiming extras cache +# osdn #48838 # Not in the upstream Freeciv server # ---------------------------------- @@ -67,6 +70,7 @@ declare -a PATCHLIST=( "backports/0057-Fix-bitvector-copy-functions" "backports/0064-featured_text.-ch-Replace-NULL-with-nullptr" "backports/0050-Cache-territory-claiming-base-types" + "backports/0050-Correct-filling-of-territory-claiming-extras-cache" "meson_webperimental" "metachange" "text_fixes" diff --git a/freeciv/patches/backports/0050-Correct-filling-of-territory-claiming-extras-cache.patch b/freeciv/patches/backports/0050-Correct-filling-of-territory-claiming-extras-cache.patch new file mode 100644 index 000000000..72a8312e1 --- /dev/null +++ b/freeciv/patches/backports/0050-Correct-filling-of-territory-claiming-extras-cache.patch @@ -0,0 +1,69 @@ +From 0fdd9abb1ddcd602f55f3832b50e5e4f568a2551 Mon Sep 17 00:00:00 2001 +From: Marko Lindqvist +Date: Thu, 12 Oct 2023 22:23:13 +0300 +Subject: [PATCH 50/50] Correct filling of territory claiming extras cache + +See osdn #48838 + +Signed-off-by: Marko Lindqvist +--- + client/packhand.c | 10 ++++++---- + server/ruleset.c | 7 ++----- + 2 files changed, 8 insertions(+), 9 deletions(-) + +diff --git a/client/packhand.c b/client/packhand.c +index 783063484c..8b913bafe0 100644 +--- a/client/packhand.c ++++ b/client/packhand.c +@@ -4283,10 +4283,7 @@ void handle_ruleset_extra(const struct packet_ruleset_extra *p) + if (extra_has_flag(pextra, EF_CAUSE_ZOC)) { + extra_type_list_append(extra_type_list_of_zoccers(), pextra); + } +- if (is_extra_caused_by(pextra, EC_BASE) +- && territory_claiming_base(extra_base_get(pextra))) { +- extra_type_list_append(extra_type_list_of_terr_claimers(), pextra); +- } ++ + pextra->hidden_by = p->hidden_by; + pextra->bridged_over = p->bridged_over; + pextra->conflicts = p->conflicts; +@@ -4336,6 +4333,11 @@ void handle_ruleset_base(const struct packet_ruleset_base *p) + pbase->vision_main_sq = p->vision_main_sq; + pbase->vision_invis_sq = p->vision_invis_sq; + pbase->vision_subs_sq = p->vision_subs_sq; ++ ++ if (territory_claiming_base(pbase)) { ++ extra_type_list_append(extra_type_list_of_terr_claimers(), ++ base_extra_get(pbase)); ++ } + } + + /************************************************************************//** +diff --git a/server/ruleset.c b/server/ruleset.c +index 75f01dd8b2..1ef4ab36dc 100644 +--- a/server/ruleset.c ++++ b/server/ruleset.c +@@ -3773,11 +3773,6 @@ static bool load_ruleset_terrain(struct section_file *file, + extra_type_list_append(extra_type_list_of_zoccers(), pextra); + } + +- if (is_extra_caused_by(pextra, EC_BASE) +- && territory_claiming_base(extra_base_get(pextra))) { +- extra_type_list_append(extra_type_list_of_terr_claimers(), pextra); +- } +- + if (!ok) { + break; + } +@@ -4008,6 +4003,8 @@ static bool load_ruleset_terrain(struct section_file *file, + } + + if (territory_claiming_base(pbase)) { ++ extra_type_list_append(extra_type_list_of_terr_claimers(), pextra); ++ + extra_type_by_cause_iterate(EC_BASE, pextra2) { + struct base_type *pbase2; + +-- +2.42.0 + diff --git a/freeciv/version.txt b/freeciv/version.txt index 1049bf739..b56e67d3c 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=b4ec6f2ab7c02cb7d3d1cad5822f82a12c154ebd +FCREV=cffdf1a2ff580d07f615c4f8cdac42cf743ca921 -ORIGCAPSTR="+Freeciv.Devel-\${MAIN_VERSION}-2023.Sep.18" +ORIGCAPSTR="+Freeciv.Devel-\${MAIN_VERSION}-2023.Sep.20" # There's no need to bump this constantly as current freeciv-web # makes no connections to outside world - all connections are