Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2006:
[Freeciv-Dev] Re: (PR#14915) AI sometimes builds duplicate improvement
Home

[Freeciv-Dev] Re: (PR#14915) AI sometimes builds duplicate improvement

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: badamson@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#14915) AI sometimes builds duplicate improvement
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sun, 8 Jan 2006 06:39:32 -0800
Reply-to: bugs@xxxxxxxxxxx

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

On Mon, 19 Dec 2005, Benedict Adamson wrote:
> The AI sometimes tries to build an improvement in a city that already
> has that improvement. This seems to happen only for barracks and other
> EFT_VETERAN_BUILD improvements, suggesting a problem in the military
> adviser code; work by myself for PR12682 suggests that its is not
> because of the ai_manage_buildings function.

ai/advmilitary.c:adjust_ai_unit_choice() line 1223:

  /* TODO: separate checks based on other requirements (e.g., unit class) */
  if ((id = ai_find_source_building(pplayer, EFT_VETERAN_BUILD)) != B_LAST) {
    choice->choice = id;
    choice->type = CT_BUILDING;
  }

This code looks suspicious.

  - Per





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