Skip to content

Commit

Permalink
Merge pull request #857 from cazfi/srvup
Browse files Browse the repository at this point in the history
  • Loading branch information
cazfi committed Jun 10, 2024
2 parents 7de28ab + b5a0ddb commit 6cd6d24
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
4 changes: 4 additions & 0 deletions freeciv/apply_patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
# 0077-city_freeze_workers_queue-Set-needs_arrange-for-citi.patch
# City status legality fix
# RM #661
# 0068-AI-Remove-shared-vision-from-pending-war-target-once.patch
# AI assert fix
# RM #701

# Not in the upstream Freeciv server
# ----------------------------------
Expand Down Expand Up @@ -61,6 +64,7 @@ declare -a PATCHLIST=(
"backports/0068-Meson-Make-libfreeciv-to-depend-on-gitrev"
"backports/0074-Meson-Make-fc_server-to-depend-on-verhdr"
"backports/0077-city_freeze_workers_queue-Set-needs_arrange-for-citi"
"backports/0068-AI-Remove-shared-vision-from-pending-war-target-once"
"RevertAmplio2ExtraUnits"
"meson_webperimental"
"metachange"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From e69ce8381fdc89c5ec4de50346550b0e8527dfe8 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <[email protected]>
Date: Wed, 5 Jun 2024 01:19:15 +0300
Subject: [PATCH 68/68] AI: Remove shared vision from pending war target once
revolting

Make sure that there's no shared vision with the war target
once senate has been dissolved and war can really be declared.

See RM #701

Signed-off-by: Marko Lindqvist <[email protected]>
---
ai/default/daidiplomacy.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/ai/default/daidiplomacy.c b/ai/default/daidiplomacy.c
index 6ac46a7fb8..730923c34a 100644
--- a/ai/default/daidiplomacy.c
+++ b/ai/default/daidiplomacy.c
@@ -1443,6 +1443,10 @@ void dai_revolution_start(struct ai_type *ait, struct player *pplayer)
struct ai_plr *data = def_ai_player_data(pplayer, ait);

if (data->diplomacy.war_target != NULL) {
+ if (gives_shared_vision(pplayer, data->diplomacy.war_target)) {
+ remove_shared_vision(pplayer, data->diplomacy.war_target);
+ }
+
dai_declare_war(ait, pplayer, data->diplomacy.war_target);

data->diplomacy.war_target = NULL;
--
2.43.0

2 changes: 1 addition & 1 deletion freeciv/version.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# The Git SHA hash for the commit to checkout from
# https://github.com/freeciv/freeciv

FCREV=95e975300e39ba90c8a561d6cfef5f64f8e490f2
FCREV=8475fba173116756aaaa0d8d84c86a89eedcb080

ORIGCAPSTR="+Freeciv.Devel-\${MAIN_VERSION}-2024.Apr.30"

Expand Down

0 comments on commit 6cd6d24

Please sign in to comment.