merge 1.5.3-RC1
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: town_cmd.cpp 27349 2015-07-30 18:48:25Z frosch $ */
|
||||
/* $Id: town_cmd.cpp 27432 2015-11-01 12:03:13Z frosch $ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
@@ -1378,8 +1378,8 @@ static void GrowTownInTile(TileIndex *tile_ptr, RoadBits cur_rb, DiagDirection t
|
||||
/* FALL THROUGH */
|
||||
|
||||
case TL_2X2_GRID:
|
||||
rcmd = GetTownRoadGridElement(t1, house_tile, target_dir);
|
||||
allow_house = (rcmd == ROAD_NONE);
|
||||
rcmd = GetTownRoadGridElement(t1, tile, target_dir);
|
||||
allow_house = (rcmd & DiagDirToRoadBits(target_dir)) == ROAD_NONE;
|
||||
break;
|
||||
|
||||
case TL_BETTER_ROADS: // Use original afterwards!
|
||||
@@ -1510,13 +1510,12 @@ static bool GrowTownAtRoad(Town *t, TileIndex start_tile, TileIndex &tile)
|
||||
|
||||
/* Try to grow the town from this point */
|
||||
GrowTownInTile(&tile, cur_rb, target_dir, t);
|
||||
if (_grow_town_result == GROWTH_SUCCEED) return true;
|
||||
|
||||
/* Exclude the source position from the bitmask
|
||||
* and return if no more road blocks available */
|
||||
if (IsValidDiagDirection(target_dir)) cur_rb &= ~DiagDirToRoadBits(ReverseDiagDir(target_dir));
|
||||
if (cur_rb == ROAD_NONE) {
|
||||
return _grow_town_result == GROWTH_SUCCEED;
|
||||
}
|
||||
if (cur_rb == ROAD_NONE) return false;
|
||||
|
||||
if (IsTileType(tile, MP_TUNNELBRIDGE)) {
|
||||
/* Only build in the direction away from the tunnel or bridge. */
|
||||
@@ -1551,7 +1550,7 @@ static bool GrowTownAtRoad(Town *t, TileIndex start_tile, TileIndex &tile)
|
||||
/* Max number of times is checked. */
|
||||
} while (--_grow_town_result >= 0);
|
||||
|
||||
return _grow_town_result == GROWTH_SUCCEED - 1;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user