Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2005:
[Freeciv-Dev] (PR#13349) /away-AI declares war
Home

[Freeciv-Dev] (PR#13349) /away-AI declares war

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mail@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#13349) /away-AI declares war
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Mon, 27 Jun 2005 08:50:43 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13349 >

> [mail@xxxxxxxxxxx - Mon Jun 27 15:23:28 2005]:
> 
> Hi,
> it happend twice too me, that a player was at peace with me, did /away
> and 10
> or more turns later the AI declared war on me... Afaik /away should
> not
> declare war at all.
> Unfortunatly it was on pubservers, so i have no savegames..
> 
> Thomas
> 
Simple patch
--
mateusz
Index: ai/advdiplomacy.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/advdiplomacy.c,v
retrieving revision 1.80
diff -u -r1.80 advdiplomacy.c
--- ai/advdiplomacy.c   21 Jun 2005 16:20:59 -0000      1.80
+++ ai/advdiplomacy.c   27 Jun 2005 15:46:08 -0000
@@ -1170,7 +1170,8 @@
     ai->diplomacy.countdown = 0; /* cosmetic */
   }
   if (target && !pplayers_at_war(pplayer, target)
-      && ai->diplomacy.countdown <= 0) {
+      && ai->diplomacy.countdown <= 0
+      && !ai_handicap(pplayer, H_AWAY)) {
     if (pplayers_allied(pplayer, target)) {
       DIPLO_LOG(LOG_DEBUG, pplayer, ai, "Went to war against %s, who is "
                  "an ally!", target->name); /* Oh, my. */

[Prev in Thread] Current Thread [Next in Thread]