summaryrefslogtreecommitdiff
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
commit3a361422fa7fbddf7cd3480e216aae214e793743 (patch)
tree819f844dc59d4c09a65853a210064a519b5ee50e
parent1a6251937ef291dcffc1ff2c543d4c39d7ef6ce5 (diff)
downloadopenttd-3a361422fa7fbddf7cd3480e216aae214e793743.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.
-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;