Complete.Org: Mailing Lists: Archives: freeciv-ai: March 2003:
[freeciv-ai] Re: (PR#3619) coordinate fix in find_city_to_diplomat
Home

[freeciv-ai] Re: (PR#3619) coordinate fix in find_city_to_diplomat

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [freeciv-ai] Re: (PR#3619) coordinate fix in find_city_to_diplomat
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Wed, 5 Mar 2003 01:59:45 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Wed, 5 Mar 2003, Jason Short wrote:
> In find_city_to_diplomat, there is an initializer:
>
> int best_dist = MAX(map.xsize, map.ysize);
>
> this is no good under gen-topologies, because it is possible for a
> distance to be larger than this (map.xsize and map.ysize are the
> _native_ dimensions of the map, while the distance is in _map_ coordinates).

It is also possible that the actual path to a distance is way longer than
this. It is only a WAG (wild ass guess) number to limit things in a
relatively sane way.

There is no need to fix it for gen topol. Maybe for other reasons, though.

  - Per




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