Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:


[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev]
From: <matusik_s@xxxxx>
Date: Tue, 13 Nov 2001 13:30:16
Reply-to: matusik_s@xxxxx

I sent You a buggy patch, here is the good one which works fine.
The main idea: Settler connects from the city in which he is in 
or in its railroad zone(move cost = 0) to the nearest unconnected one.
To prevent using many settlers to do the same connection I added code:

     if (p->connecting && warmap.cost[p->x][p->y] <= mv_rate)
      return 0;

It means that each railroad zone can only have one settler who 
connects it to another one.

This code can only build railroads because I assume that distance 
beetwen two
connected cities = 0.
mateusz stefek

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev], matusik_s <=