summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-10-20 10:19:23 +0000
committermaedhros <maedhros@openttd.org>2007-10-20 10:19:23 +0000
commit54369cba0f9d1cda2d40752eb337d153b3b6775f (patch)
tree819f844dc59d4c09a65853a210064a519b5ee50e /src
parentdc6e3251c2224c56b82d1caa8cb739bca1738445 (diff)
downloadopenttd-54369cba0f9d1cda2d40752eb337d153b3b6775f.tar.xz
(svn r11308) -Fix (r9315): Change the house id as well as the house spec when using an overridden town building, since the house id is the one that's used to actually build the house.
Diffstat (limited to 'src')
-rw-r--r--src/town_cmd.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index aaeb518cb..342a4f195 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -1707,7 +1707,10 @@ static void DoBuildTownHouse(Town *t, TileIndex tile)
hs = GetHouseSpecs(house);
if (_loaded_newgrf_features.has_newhouses) {
- if (hs->override != 0) hs = GetHouseSpecs(hs->override);
+ if (hs->override != 0) {
+ house = hs->override;
+ hs = GetHouseSpecs(house);
+ }
if ((hs->extra_flags & BUILDING_IS_HISTORICAL) && !_generating_world) continue;