diff options
author | maedhros <maedhros@openttd.org> | 2007-03-20 10:06:39 +0000 |
---|---|---|
committer | maedhros <maedhros@openttd.org> | 2007-03-20 10:06:39 +0000 |
commit | 7812f7fd0ac617a9df41730e6770519154bc5344 (patch) | |
tree | 8a660faeb6f841b468fcaac90a3f35ccf849e1a8 /src/town_cmd.cpp | |
parent | b82ed41a1925803dde29d7e03cf113808faa93d3 (diff) | |
download | openttd-7812f7fd0ac617a9df41730e6770519154bc5344.tar.xz |
(svn r9367) -Fix (r9315): If a new house doesn't have a corresponding action 3, the
graphics for the substitute (original) house should be drawn instead.
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r-- | src/town_cmd.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 716eb673f..ec689b8f1 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -127,8 +127,15 @@ static void DrawTile_Town(TileInfo *ti) HouseID house_id = GetHouseType(ti->tile); if (house_id >= NEW_HOUSE_OFFSET) { - DrawNewHouseTile(ti, house_id); - return; + /* Houses don't necessarily need new graphics. If they don't have a + * spritegroup associated with them, then the sprite for the substitute + * house id is drawn instead. */ + if (GetHouseSpecs(house_id)->spritegroup != NULL) { + DrawNewHouseTile(ti, house_id); + return; + } else { + house_id = GetHouseSpecs(house_id)->substitute_id; + } } /* Retrieve pointer to the draw town tile struct */ |