From 794df9f6fb082b54a96a00c8339df62f05d0e573 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 28 Apr 2024 09:39:16 +0300 Subject: [PATCH] Update to Freeciv server freeciv/freeciv@16570b44e2 Signed-off-by: Marko Lindqvist --- freeciv/apply_patches.sh | 4 -- ...spot-value-calculation-with-unknown-.patch | 51 ------------------- freeciv/version.txt | 2 +- 3 files changed, 1 insertion(+), 56 deletions(-) delete mode 100644 freeciv/patches/backports/0053-AI-Fix-bad-city-spot-value-calculation-with-unknown-.patch diff --git a/freeciv/apply_patches.sh b/freeciv/apply_patches.sh index 34a5bbc26..c81bfd1f8 100755 --- a/freeciv/apply_patches.sh +++ b/freeciv/apply_patches.sh @@ -9,9 +9,6 @@ # 0038-AI-Delay-war-declaration-until-really-revolted.patch # AI senate dismissal fix # osdn #48018 -# 0053-AI-Fix-bad-city-spot-value-calculation-with-unknown-.patch -# AI city spot evaluation fix -# RM #408 # 0046-Fix-freeciv-web-build.patch # Freeciv-web build fix # RM #435 @@ -57,7 +54,6 @@ declare -a GIT_PATCHLIST=( declare -a PATCHLIST=( "backports/0038-AI-Delay-war-declaration-until-really-revolted" - "backports/0053-AI-Fix-bad-city-spot-value-calculation-with-unknown-" "backports/0046-Fix-freeciv-web-build" "backports/0034-update_bulbs-Fix-research-researching_saved-research" "backports/0050-Initialize-extra-before-calling-unit_assign_specific" diff --git a/freeciv/patches/backports/0053-AI-Fix-bad-city-spot-value-calculation-with-unknown-.patch b/freeciv/patches/backports/0053-AI-Fix-bad-city-spot-value-calculation-with-unknown-.patch deleted file mode 100644 index 2ca305856..000000000 --- a/freeciv/patches/backports/0053-AI-Fix-bad-city-spot-value-calculation-with-unknown-.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 940ce754eba1d509a24b11427f715e8ef2306075 Mon Sep 17 00:00:00 2001 -From: Marko Lindqvist -Date: Sun, 7 Apr 2024 00:35:33 +0300 -Subject: [PATCH 53/53] AI: Fix bad city spot value calculation with unknown - tiles - -Unknown and already worked tiles counted as negative output value. -Now they count as 0, as they cannot produce anything for the city. - -See RM #408 - -Signed-off-by: Marko Lindqvist ---- - ai/default/daisettler.c | 15 ++++++++++----- - 1 file changed, 10 insertions(+), 5 deletions(-) - -diff --git a/ai/default/daisettler.c b/ai/default/daisettler.c -index 7372167d81..3395dfa9e8 100644 ---- a/ai/default/daisettler.c -+++ b/ai/default/daisettler.c -@@ -374,17 +374,22 @@ static struct cityresult *cityresult_fill(struct ai_type *ait, - result->best_other.tile = ptile; - result->best_other.cindex = cindex; - } else if (ptdc->sum > result->best_other.tdc->sum) { -- /* First add other other to remaining */ -- result->remaining += result->best_other.tdc->sum -- / GROWTH_POTENTIAL_DEEMPHASIS; -+ /* First add other other to remaining, unless it's unavailable (value < 0) tile. */ -+ if (result->best_other.tdc->sum > 0) { -+ result->remaining += result->best_other.tdc->sum -+ / GROWTH_POTENTIAL_DEEMPHASIS; -+ } - /* Then make new best other */ - result->best_other.tdc = ptdc; - result->best_other.tile = ptile; - result->best_other.cindex = cindex; - } else { - /* Save total remaining calculation, divided by crowdedness -- * of the area and the emphasis placed on space for growth. */ -- result->remaining += ptdc->sum / GROWTH_POTENTIAL_DEEMPHASIS; -+ * of the area and the emphasis placed on space for growth. -+ * Do not add unavailable (value < 0) tiles. */ -+ if (ptdc->sum > 0) { -+ result->remaining += ptdc->sum / GROWTH_POTENTIAL_DEEMPHASIS; -+ } - } - - tile_data_cache_hash_replace(result->tdc_hash, cindex, ptdc); --- -2.43.0 - diff --git a/freeciv/version.txt b/freeciv/version.txt index 90881a7ec..aa64fa85d 100644 --- a/freeciv/version.txt +++ b/freeciv/version.txt @@ -1,7 +1,7 @@ # The Git SHA hash for the commit to checkout from # https://github.com/freeciv/freeciv -FCREV=579ebb52b9ba166efe898cd864f058ab2a1bbcbb +FCREV=16570b44e264909b17651615ca58d3d9b74f8a64 ORIGCAPSTR="+Freeciv.Devel-\${MAIN_VERSION}-2024.Apr.09"