@@ -930,49 +930,49 @@ static bool GrowTown(Town *t)
{ 0, 0}
};
/* Current player is a town */
old_player = _current_player;
_current_player = OWNER_TOWN;
/* Find a road that we can base the construction on. */
tile = t->xy;
for (ptr = _town_coord_mod; ptr != endof(_town_coord_mod); ++ptr) {
if (GetAnyRoadTrackBits(tile) != 0) {
int r = GrowTownAtRoad(t, tile);
_current_player = old_player;
return r != 0;
}
tile = TILE_ADD(tile, ToTileIndexDiff(*ptr));
/* No road available, try to build a random road block by
* clearing some land and then building a road there. */
/* Only work with plain land that not already has a house */
if (!IsTileType(tile, MP_HOUSE) && GetTileSlope(tile, NULL) == SLOPE_FLAT) {
if (!CmdFailed(DoCommand(tile, 0, 0, DC_AUTO, CMD_LANDSCAPE_CLEAR))) {
if (!CmdFailed(DoCommand(tile, 0, 0, DC_AUTO | DC_NO_WATER, CMD_LANDSCAPE_CLEAR))) {
DoCommand(tile, GenRandomRoadBits(), t->index, DC_EXEC | DC_AUTO, CMD_BUILD_ROAD);
return true;
return false;
static void UpdateTownRadius(Town *t)
{
static const uint16 _town_radius_data[23][5] = {
{ 4, 0, 0, 0, 0}, // 0
{ 16, 0, 0, 0, 0},
{ 25, 0, 0, 0, 0},
{ 36, 0, 0, 0, 0},
{ 49, 0, 4, 0, 0},
{ 64, 0, 4, 0, 0}, // 20
{ 64, 0, 9, 0, 1},
{ 64, 0, 9, 0, 4},
{ 64, 0, 16, 0, 4},
Status change: