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

[Freeciv-Dev] 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-Dev] Re: (PR#11009) AI Hunts Own Units
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Sun, 14 Nov 2004 18:20:04 -0800
Reply-to: rt@xxxxxxxxxxx

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

On Sat, 13 Nov 2004, Benedict Adamson wrote:

>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=11009 >
>
> The ai_hunter_findjob function in aihunt.c contains the condition
>      if (!aplayer->is_alive || !is_player_dangerous(pplayer, aplayer)) {
> that condition should be
>      if (pplayer == aplayer || !aplayer->is_alive
>       || !is_player_dangerous(pplayer, aplayer)) {
> As the code stands, the AI will consider hunting its own units.

IMHO it would be better to modify is_player_dangerous to return FALSE then
pplayer == aplayer.

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa







[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#11009) AI Hunts Own Units, Vasco Alexandre da Silva Costa <=