Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] (PR#2690) [PATCH] Show unit location in its description
Home

[Freeciv-Dev] (PR#2690) [PATCH] Show unit location in its description

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: stepan@xxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#2690) [PATCH] Show unit location in its description
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Sun, 12 Jan 2003 01:32:34 -0800
Reply-to: rt@xxxxxxxxxxxxxx

[jdorje - Sun Jan 12 09:10:20 2003]:

> [rfalke - Tue Jan  7 16:04:03 2003]:
> 
> > On Fri, Jan 03, 2003 at 03:02:15AM -0800, Jason Short via RT wrote:
> > > Looping over every city to find the one closest to the unit is OK
given
> > > the current users of unit_description.  But since the function is in
> > 
> > > common/ the server might be tempted to use it, and that would be bad.
> > 
> > The server already has his function:
> > server/unittools.c:get_location_str(). The question is now: it is
> > possible to merge/unify/whatever this function and
> > ai/aitools.c:dist_nearest_city and the new functions in
> > client/climisc.c?
> 
> The AI's dist_nearest_city uses real_map_distance to find the "nearest"
> city.  The unit description uses the pythagorean distance.  Both are
> correct to do this, but unless we want to keep adding parameters to thee
> function (dist_nearest_city has a few) it makes it ugly to merge them.

On the other hand dist_nearest_city is not topology-safe (which I never
noticed before), and this would give a chance to fix it...

jason



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