Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: 'goto' prefers the path via ship (PR#888)
Home

[Freeciv-Dev] Re: 'goto' prefers the path via ship (PR#888)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Thue <thue@xxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: 'goto' prefers the path via ship (PR#888)
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Tue, 14 Aug 2001 10:43:55 +0100 (BST)

 --- Thue <thue@xxxxxxx> wrote: 

> +       if (map_get_terrain(src_x, src_y) == T_OCEAN) {
[..]
> +       } else {
> +         /* Attempting to make a path through a sea transporter */
> +         move_cost = SINGLE_MOVE + MOVE_COST_ROAD; /* Rather arbitrary 
> deterrent */
> +       }
> 
> Should have been
> 
[..]
> +
> +       if (src_x != x || src_y != y) {
> +         /* Attempting to make a path through a sea transporter */
> +         move_cost += MOVE_COST_ROAD; /* Rather arbitrary deterrent */
> +       }
> 
> I think.

You right.  I don't know what weird thinking brought me to such solution.
 Probably shouldn't send patches on the same day I make them.

Tested your edition of the patch.  Compliles and works fine.

However I do not quite understand the significance of the empty line
before 
+         if (src_x != x || src_y != y) {
:))

G.

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie


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