diff -ru freeciv-/server/gotohand.h freeciv/server/gotohand.h --- freeciv-/server/gotohand.h Thu Oct 4 22:09:29 2001 +++ freeciv/server/gotohand.h Sun Nov 25 16:43:43 2001 @@ -37,13 +37,21 @@ int calculate_move_cost(struct unit *punit, int dest_x, int dest_y); int air_can_move_between(int moves, int src_x, int src_y, int dest_x, int dest_y, struct player *pplayer); - -/* all other functions are internal */ - -#define THRESHOLD 12 - - int goto_is_sane(struct unit *punit, int x, int y, int omni); + +/* + * Maximal possible distance unit with move_rate 1 can move away in certain + * number of turns. + * + * We can't move faster than 3 tiles per turn (roads), and the best value for + * certain number of turns looks 4. + * + * For railroads, this would be infinite (infinite tiles per turn), however + * we don't have to care about them, as we usually compare this to warmap + * move cost and it's zero for railroads, so it will be always better than + * THRESHOLD and we will be able to get there in the time. + */ +#define THRESHOLD (4 * 3) struct move_cost_map { unsigned char *cost[MAP_MAX_WIDTH];