File diff r27055:8db4d6833ae7 → r27056:ac04ccbeb86c
src/road_cmd.cpp
Show inline comments
 
@@ -1877,25 +1877,25 @@ void UpdateNearestTownForRoadTiles(bool 
 
	for (TileIndex t = 0; t < Map::Size(); t++) {
 
		if (IsTileType(t, MP_ROAD) && !IsRoadDepot(t) && !HasTownOwnedRoad(t)) {
 
			TownID tid = INVALID_TOWN;
 
			if (!invalidate) {
 
				const Town *town = CalcClosestTownFromTile(t);
 
				if (town != nullptr) tid = town->index;
 
			}
 
			SetTownIndex(t, tid);
 
		}
 
	}
 
}
 

	
 
static int GetSlopePixelZ_Road(TileIndex tile, uint x, uint y)
 
static int GetSlopePixelZ_Road(TileIndex tile, uint x, uint y, bool ground_vehicle)
 
{
 

	
 
	if (IsNormalRoad(tile)) {
 
		int z;
 
		Slope tileh = GetTilePixelSlope(tile, &z);
 
		if (tileh == SLOPE_FLAT) return z;
 

	
 
		Foundation f = GetRoadFoundation(tileh, GetAllRoadBits(tile));
 
		z += ApplyPixelFoundationToSlope(f, &tileh);
 
		return z + GetPartialPixelZ(x & 0xF, y & 0xF, tileh);
 
	} else {
 
		return GetTileMaxPixelZ(tile);