(svn r18567) -Fix [FS#2613]: [NewGRF] House property 15 did not work

This commit is contained in:
rubidium
2009-12-20 14:53:32 +00:00
parent 1e1fa9ff2e
commit ee3a44e74f
4 changed files with 30 additions and 13 deletions

View File

@@ -137,4 +137,15 @@ struct HouseSpec {
}
};
/**
* Do HouseID translation for NewGRFs.
* @param hid the HouseID to get the override for.
* @return the HouseID to actually work with.
*/
static inline HouseID GetTranslatedHouseID(HouseID hid)
{
const HouseSpec *hs = HouseSpec::Get(hid);
return hs->override == INVALID_HOUSE_ID ? hid : hs->override;
}
#endif /* HOUSE_H */