summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-04-26 21:04:18 +0000
committerfrosch <frosch@openttd.org>2012-04-26 21:04:18 +0000
commitcc1e4ca5ad798f4cd027dc9264fdecd703eafef5 (patch)
tree32872d9729ae0779bb02d35ff95eecff06eb7f69
parent0d03c1ff85e1b98fe1714d1bd0057869f345b21f (diff)
downloadopenttd-cc1e4ca5ad798f4cd027dc9264fdecd703eafef5.tar.xz
(svn r24183) -Fix [FS#5169]: Town radii were not updated immediatelly after construction/destruction of houses, resulting in desyncs.
-rw-r--r--src/town_cmd.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index efe91c1ac..7cd6770f1 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -769,8 +769,6 @@ static void TownTickHandler(Town *t)
}
t->grow_counter = i;
}
-
- UpdateTownRadius(t);
}
void OnTick_Town()
@@ -2304,6 +2302,7 @@ static bool BuildTownHouse(Town *t, TileIndex tile)
}
MakeTownHouse(tile, t, construction_counter, construction_stage, house, random_bits);
+ UpdateTownRadius(t);
UpdateTownCargoes(t, tile);
return true;
@@ -2387,6 +2386,8 @@ void ClearTownHouse(Town *t, TileIndex tile)
if (eflags & BUILDING_2_TILES_X) DoClearTownHouseHelper(tile + TileDiffXY(1, 0), t, ++house);
if (eflags & BUILDING_HAS_4_TILES) DoClearTownHouseHelper(tile + TileDiffXY(1, 1), t, ++house);
+ UpdateTownRadius(t);
+
/* Update cargo acceptance. */
UpdateTownCargoes(t, tile);
}