town_cmd.c
changeset 1927 1181e7652e2f
parent 1902 86b7fb11f938
child 1928 1aab00f664d7
equal deleted inserted replaced
1926:530480d14685 1927:1181e7652e2f
  1839 	Town *best_town = NULL;
  1839 	Town *best_town = NULL;
  1840 
  1840 
  1841 	// XXX - Fix this so for a given tiletype the owner of the type is in the same variable
  1841 	// XXX - Fix this so for a given tiletype the owner of the type is in the same variable
  1842 	if (IsTileType(tile, MP_HOUSE) || (
  1842 	if (IsTileType(tile, MP_HOUSE) || (
  1843 				IsTileType(tile, MP_STREET) &&
  1843 				IsTileType(tile, MP_STREET) &&
  1844 				((_map5[tile] & 0xF0) != 0x10 ? GetTileOwner(tile) : _map3_lo[tile]) == OWNER_TOWN
  1844 				(IsLevelCrossing(tile) ? _map3_lo[tile] == OWNER_TOWN : GetTileOwner(tile))
  1845 			))
  1845 			))
  1846 		return GetTown(_map2[tile]);
  1846 		return GetTown(_map2[tile]);
  1847 
  1847 
  1848 	FOR_ALL_TOWNS(t) {
  1848 	FOR_ALL_TOWNS(t) {
  1849 		if (t->xy != 0) {
  1849 		if (t->xy != 0) {