Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: Game/server crash CivGame 24859 civserver.freeciv.org
Home

[Freeciv-Dev] Re: Game/server crash CivGame 24859 civserver.freeciv.org

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: schnetter@xxxxxxx, freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Game/server crash CivGame 24859 civserver.freeciv.org port 5570 (PR#1062)
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Sun, 18 Nov 2001 17:03:53 -0800 (PST)

--- schnetter@xxxxxxx wrote:

In 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]