1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-22 11:44:17 +01:00

(svn r22702) [1.1] -Backport from trunk:

- Fix: Cost of adding an extra road type to a bridge or tunnel was undercalculated [FS#4680, FS#4681] (r22700, r22699)
- Fix: Only insert cleared object tiles into _cleared_object_areas if clearing actually succeeds, else subsequential tests of the same tile will be skipped and considered successful [FS#4694] (r22698)
- Fix: When building a house it could be built at the wrong place if multitile houses failed some tests (r22697)
This commit is contained in:
rubidium
2011-07-30 17:48:23 +00:00
parent a51531e410
commit be65972895
5 changed files with 25 additions and 11 deletions

View File

@@ -2125,8 +2125,16 @@ static bool BuildTownHouse(Town *t, TileIndex tile)
}
uint maxz = GetTileMaxZ(tile);
TileIndex baseTile = tile;
while (probability_max > 0) {
/* Building a multitile building can change the location of tile.
* The building would still be built partially on that tile, but
* its nothern tile would be elsewere. However, if the callback
* fails we would be basing further work from the changed tile.
* So a next 1x1 tile building could be built on the wrong tile. */
tile = baseTile;
uint r = RandomRange(probability_max);
uint i;
for (i = 0; i < num; i++) {