[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]
<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
- [Freeciv-Dev] Re: (PR#12559) [Patch] is_ocean() -> can_unit_exist_at_tile(),
Per I. Mathisen <=
|
|