Fix town nearby station cache not being updated when house is rebuilt smaller/different shape
This commit is contained in:
@@ -788,9 +788,9 @@ static void TileLoop_Town(TileIndex tile)
|
|||||||
ClearTownHouse(t, tile);
|
ClearTownHouse(t, tile);
|
||||||
|
|
||||||
/* Rebuild with another house? */
|
/* Rebuild with another house? */
|
||||||
if (GB(r, 24, 8) < 12 || !BuildTownHouse(t, tile))
|
bool built = (GB(r, 24, 8) >= 12 && BuildTownHouse(t, tile));
|
||||||
{
|
if (!built || ((hs->building_flags & BUILDING_HAS_1_TILE & ~HouseSpec::Get(GetHouseType(tile))->building_flags) != 0)) {
|
||||||
/* House wasn't replaced, so remove it */
|
/* House wasn't replaced, or replacement was smaller/different shape, so remove it */
|
||||||
if (!_generating_world) RemoveNearbyStations(t);
|
if (!_generating_world) RemoveNearbyStations(t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user