diff options
author | rubidium <rubidium@openttd.org> | 2009-12-20 14:53:32 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-12-20 14:53:32 +0000 |
commit | ee3a44e74f5f24fce5f0d1a975d38453b417201b (patch) | |
tree | 756e8891ae36b21381723f9ab4b7e1ea7b1ea5a4 /src/house.h | |
parent | 1e1fa9ff2eee6f194e2b3172f1cf0439113f50a6 (diff) | |
download | openttd-ee3a44e74f5f24fce5f0d1a975d38453b417201b.tar.xz |
(svn r18567) -Fix [FS#2613]: [NewGRF] House property 15 did not work
Diffstat (limited to 'src/house.h')
-rw-r--r-- | src/house.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/house.h b/src/house.h index e6eae34c7..ed73cc806 100644 --- a/src/house.h +++ b/src/house.h @@ -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 */ |