Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: The missing patch
Home

[Freeciv-Dev] Re: The missing patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mateusz stefek <matusik_s@xxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: The missing patch
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Mon, 19 Nov 2001 03:03:28 -0800 (PST)

--- mateusz stefek <matusik_s@xxxxx> wrote:
> For ai cross-country-rail

n the function 

static int cross_country_rail(struct unit* punit, struct player* pplayer) 

int d = warmap.cost[pcity->x][pcity->y];
    if (d == 0) is_connected = 1;else

You cannot assume railroad_move cost is always going to equal 0.
Make the test if (d == railroad_move_cost). In fact, for a non zero
movecost this function would have to be rewritten. You need a check
that counts the number of tiles between pctiy x and y. Multiply the
result by railroad_move_cost. If d = the result then is connected.




__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com


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