(svn r21052) -Fix (r20435): house/airporttile/industrytile newgrfs that defined tiles that relied on the substitute being drawn were broken

This commit is contained in:
yexo
2010-10-28 11:10:12 +00:00
parent 05407c9b74
commit 9a07ebc382
6 changed files with 8 additions and 8 deletions

View File

@@ -207,7 +207,7 @@ static void DrawTile_Town(TileInfo *ti)
/* 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 (HouseSpec::Get(house_id)->grf_prop.spritegroup != NULL) {
if (HouseSpec::Get(house_id)->grf_prop.spritegroup[0] != NULL) {
DrawNewHouseTile(ti, house_id);
return;
} else {
@@ -264,7 +264,7 @@ static Foundation GetFoundation_Town(TileIndex tile, Slope tileh)
*/
if (hid >= NEW_HOUSE_OFFSET) {
const HouseSpec *hs = HouseSpec::Get(hid);
if (hs->grf_prop.spritegroup != NULL && HasBit(hs->callback_mask, CBM_HOUSE_DRAW_FOUNDATIONS)) {
if (hs->grf_prop.spritegroup[0] != NULL && HasBit(hs->callback_mask, CBM_HOUSE_DRAW_FOUNDATIONS)) {
uint32 callback_res = GetHouseCallback(CBID_HOUSE_DRAW_FOUNDATIONS, 0, 0, hid, Town::GetByTile(tile), tile);
if (callback_res == 0) return FOUNDATION_NONE;
}