Complete.Org: Mailing Lists: Archives: freeciv-ai: September 2004:
[freeciv-ai] (PR#9884) AI never breaks alliance
Home

[freeciv-ai] (PR#9884) AI never breaks alliance

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [freeciv-ai] (PR#9884) AI never breaks alliance
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Fri, 3 Sep 2004 08:13:17 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9884 >

Onother problem is that triangles are unbreakable.
This patch fixes it.
--
mateusz
Index: advdiplomacy.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/advdiplomacy.c,v
retrieving revision 1.33
diff -u -r1.33 advdiplomacy.c
--- advdiplomacy.c      2 Sep 2004 20:10:06 -0000       1.33
+++ advdiplomacy.c      3 Sep 2004 15:12:25 -0000
@@ -774,8 +774,9 @@
         || !aplayer->is_alive
         || ds == DS_NO_CONTACT
         || (pplayer->team != TEAM_NONE && pplayer->team == aplayer->team)
-        || (pplayer != ai->diplomacy.alliance_leader 
-            && adip->is_allied_with_ally)
+        || (pplayer != ai->diplomacy.alliance_leader && 
+           aplayer != ai->diplomacy.alliance_leader &&
+            adip->is_allied_with_ally)
         || (pplayer_get_diplstate(aplayer, ai->diplomacy.alliance_leader)->type
             == DS_CEASEFIRE)) {
       continue;

[Prev in Thread] Current Thread [Next in Thread]
  • [freeciv-ai] (PR#9884) AI never breaks alliance, Mateusz Stefek <=