Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] Re: (PR#12559) [Patch] is_ocean() -> can_unit_exist_at_til
Home

[Freeciv-Dev] Re: (PR#12559) [Patch] is_ocean() -> can_unit_exist_at_til

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: marko.lindqvist@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#12559) [Patch] is_ocean() -> can_unit_exist_at_tile()
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Tue, 22 Mar 2005 02:54:03 -0800
Reply-to: bugs@xxxxxxxxxxx

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

On Mon, 21 Mar 2005, Jason Short wrote:
> Here is an updated version of the patch.

       if (ptile->city
           || TEST_BIT(target->ai.hunted, pplayer->player_no)
-          || (!is_ocean(ptile->terrain) && is_sailing_unit(punit))
-          || (is_ocean(ptile->terrain) && is_ground_unit(punit))
+         || !can_unit_exist_at_tile(punit, ptile)
           || (!is_sailing_unit(target) && is_sailing_unit(punit))
           || (is_sailing_unit(target) && !is_sailing_unit(punit))
           || !goto_is_sane(punit, target->tile, TRUE)) {
         /* Can't hunt this one. */
+       /* FIXME: this prevents airplanes from hunting sailing units. */
         continue;

This is somewhat mistaken. Hunter code will not handle air units, and it
should not hunt units in cities.

  - Per





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