[Freeciv-Dev] Re: The missing patch
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- 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