Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: [Patch] Cleanup of tile_move_cost_ai
Home

[Freeciv-Dev] Re: [Patch] Cleanup of tile_move_cost_ai

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [Patch] Cleanup of tile_move_cost_ai
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 7 Oct 2001 14:51:44 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sun, Oct 07, 2001 at 05:38:48AM -0700, Raahul Kumar wrote:
> 
> --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> > 
> > I thought about using the move_cost field of struct tile for the goto
> > agent. However I had hard time to understand tile_move_cost_ai and the
> > (to me mysterious) -3. The attached patch should allow others not the
> > fall into this.
> > 
> 
> The -3 move cost does seem to be mysterious. 

> As far as I know, that number means nothing in particular, i.e -3 is
> never added or subtracted to in any way, could as easy be -5 or any
> other negative number.

I agree with this.

> If that number does mean something, could you please add that in the
> comments?

Something like the folling?

 struct Sprite;                 /* opaque; client-gui specific */

-#define NUM_DIRECTION_NSEW 16
+#define NUM_DIRECTION_NSEW             16
/*
 * The value has no meaning. The value is only used for comparing. The
 * value must be <0.
 */
+#define MOVE_COST_FOR_VALID_SEA_STEP   (-3)

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Using only the operating-system that came with your computer is just
  like only playing the demo-disc that came with your CD-player."


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