Skip to content

Commit

Permalink
Fix town nearby station cache not being updated when house is rebuilt…
Browse files Browse the repository at this point in the history
… smaller/different shape
  • Loading branch information
JGRennison committed Jun 9, 2019
1 parent 16e590d commit 326dfd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/town_cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -788,9 +788,9 @@ static void TileLoop_Town(TileIndex tile)
ClearTownHouse(t, tile);

/* Rebuild with another house? */
if (GB(r, 24, 8) < 12 || !BuildTownHouse(t, tile))
{
/* House wasn't replaced, so remove it */
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, or replacement was smaller/different shape, so remove it */
if (!_generating_world) RemoveNearbyStations(t);
}
}
Expand Down

0 comments on commit 326dfd3

Please sign in to comment.