# HG changeset patch # Parent 6bed69ba46d6afb0aa98b3894c8dc208ef993754 # Parent 3d9794baa4eb823296c7ea0f10941cf39dd0d62e diff -r 3d9794baa4eb src/newgrf_house.cpp --- a/src/newgrf_house.cpp Sun Mar 13 18:45:37 2016 +0000 +++ b/src/newgrf_house.cpp Mon Mar 14 08:02:11 2016 +0100 @@ -399,7 +399,8 @@ case 0x66: { TileIndex testtile = GetNearbyTile(parameter, this->tile); if (!IsTileType(testtile, MP_HOUSE)) return 0xFFFFFFFF; - HouseSpec *hs = HouseSpec::Get(GetHouseType(testtile)); + HouseID nearby_house_id = GetHouseType(testtile); + HouseSpec *hs = HouseSpec::Get(nearby_house_id); /* Information about the grf local classid if the house has a class */ uint houseclass = 0; if (hs->class_id != HOUSE_NO_CLASS) { @@ -408,8 +409,8 @@ } /* old house type or grf-local houseid */ uint local_houseid = 0; - if (this->house_id < NEW_HOUSE_OFFSET) { - local_houseid = this->house_id; + if (nearby_house_id < NEW_HOUSE_OFFSET) { + local_houseid = nearby_house_id; } else { local_houseid = (hs->grf_prop.grffile == this->ro.grffile ? 1 : 2) << 8; local_houseid |= hs->grf_prop.local_id;