-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #857 from cazfi/srvup
- Loading branch information
Showing
3 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
freeciv/patches/backports/0068-AI-Remove-shared-vision-from-pending-war-target-once.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters