src/town.cpp
branchgamebalance
changeset 9911 0b8b245a2391
parent 9903 dc85aaa556ae
equal deleted inserted replaced
9910:0b2aebc8283e 9911:0b8b245a2391
    30 	DEBUG(eco, 7, "Obtaining highest town radius for tile 0x%x", tile);
    30 	DEBUG(eco, 7, "Obtaining highest town radius for tile 0x%x", tile);
    31 
    31 
    32 	/* We do have a tile that directly belongs to a town */
    32 	/* We do have a tile that directly belongs to a town */
    33 	if (IsTileType(tile, MP_HOUSE) ||
    33 	if (IsTileType(tile, MP_HOUSE) ||
    34 			(IsTileType(tile, MP_STREET) &&
    34 			(IsTileType(tile, MP_STREET) &&
    35 			(IsLevelCrossing(tile) ? GetCrossingRoadOwner(tile) : GetTileOwner(tile)) == OWNER_TOWN)) {
    35 			(GetTileOwner(tile)) == OWNER_TOWN)) { /** @todo check this for level crossings, trams, etc */
    36 		t = GetTownByTile(tile);
    36 		t = GetTownByTile(tile);
    37 		group = t->GetRadiusGroup(tile, true) + 1;
    37 		group = t->GetRadiusGroup(tile, true) + 1;
    38 		DEBUG(eco, 6, "Tile 0x%x belongs to town at 0x%x, level %d", tile, t->xy, group);
    38 		DEBUG(eco, 6, "Tile 0x%x belongs to town at 0x%x, level %d", tile, t->xy, group);
    39 		return t;
    39 		return t;
    40 	}
    40 	}