From 54369cba0f9d1cda2d40752eb337d153b3b6775f Mon Sep 17 00:00:00 2001
From: maedhros <maedhros@openttd.org>
Date: Sat, 20 Oct 2007 10:19:23 +0000
Subject: (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.

---
 src/town_cmd.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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;
 
-- 
cgit v1.2.3-70-g09d2