src/newgrf_industries.cpp
changeset 7706 bbf501d68106
parent 7685 20852b29c17b
child 7750 7afbef1235e0
equal deleted inserted replaced
7705:15d3606da072 7706:bbf501d68106
    81  * @param tile TileIndex of the tile to query
    81  * @param tile TileIndex of the tile to query
    82  * @param i Industry to which to compare the tile to
    82  * @param i Industry to which to compare the tile to
    83  * @return value encoded as per NFO specs */
    83  * @return value encoded as per NFO specs */
    84 uint32 GetIndustryIDAtOffset(TileIndex tile, const Industry *i)
    84 uint32 GetIndustryIDAtOffset(TileIndex tile, const Industry *i)
    85 {
    85 {
    86 	if (!IsTileType(tile, MP_INDUSTRY) || GetIndustryIndex(tile) == i->index) {
    86 	if (!IsTileType(tile, MP_INDUSTRY) || GetIndustryIndex(tile) != i->index) {
    87 		/* No industry and/or the tile does not have the same industry as the one we match it with */
    87 		/* No industry and/or the tile does not have the same industry as the one we match it with */
    88 		return 0xFFFF;
    88 		return 0xFFFF;
    89 	}
    89 	}
    90 
    90 
    91 	IndustryGfx gfx = GetCleanIndustryGfx(tile);
    91 	IndustryGfx gfx = GetCleanIndustryGfx(tile);