Complete.Org: Mailing Lists: Archives: freeciv-ai: November 2004:
[freeciv-ai] Re: (PR#11009) AI Hunts Own Units
Home

[freeciv-ai] Re: (PR#11009) AI Hunts Own Units

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: badamson@xxxxxxxxxxxxx
Subject: [freeciv-ai] Re: (PR#11009) AI Hunts Own Units
From: "Benedict Adamson" <badamson@xxxxxxxxxxx>
Date: Mon, 15 Nov 2004 14:09:42 -0800
Reply-to: rt@xxxxxxxxxxx

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

Jason Short wrote:
...
> Will you make a patch?
...

Here it is, for 2.0.0 beta.

--- vendor.freeciv.beta/ai/aihunt.c     2004-10-09 21:01:42.000000000 +0100
+++ freeciv.PR11009/ai/aihunt.c 2004-11-15 22:11:14.000000000 +0000
@@ -266,7 +266,8 @@
   assert(pplayer->is_alive);
 
   players_iterate(aplayer) {
-    if (!aplayer->is_alive || !is_player_dangerous(pplayer, aplayer)) {
+    if (aplayer == pplayer || !aplayer->is_alive
+       || !is_player_dangerous(pplayer, aplayer)) {
       continue;
     }
     unit_list_iterate(aplayer->units, target) {

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