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

On Fri, 2 Feb 2007, [EMAIL PROTECTED] wrote:
> - an AI-controlled player requests me to declare war upon a player which is 
> already dead

Fix attached. Untested but should work.

   - Per
Index: ai/advdiplomacy.c
===================================================================
--- ai/advdiplomacy.c   (revision 12601)
+++ ai/advdiplomacy.c   (working copy)
@@ -1495,15 +1495,13 @@
       } players_iterate_end;
 
       if ((players_on_same_team(pplayer, aplayer)
-          || pplayer->ai.love[aplayer->player_no] > MAX_AI_LOVE / 2)
-          && !target) {
+          || pplayer->ai.love[aplayer->player_no] > MAX_AI_LOVE / 2)) {
         /* Share techs only with team mates and allies we really like. */
         ai_share(pplayer, aplayer);
+      }
+      if (!target || !target->is_alive) {
         adip->ally_patience = 0;
-        break;
-      } else if (!target) {
-        adip->ally_patience = 0;
-        break;
+        break; /* No need to nag our ally */
       }
 
       switch (adip->ally_patience--) {
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to