1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-22 11:44:17 +01:00

Add: Road waypoint functionality

This commit is contained in:
Jonathan G Rennison
2024-04-28 20:21:14 +01:00
committed by rubidium42
parent c6387c7784
commit 9c84e5df3f
39 changed files with 715 additions and 154 deletions

View File

@@ -437,6 +437,9 @@ uint32_t GetNearbyTileInformation(TileIndex tile, bool grf_version8)
/* Fake tile type for trees on shore */
if (IsTileType(tile, MP_TREES) && GetTreeGround(tile) == TREE_GROUND_SHORE) tile_type = MP_WATER;
/* Fake tile type for road waypoints */
if (IsRoadWaypointTile(tile)) tile_type = MP_ROAD;
auto [tileh, z] = GetTilePixelSlope(tile);
/* Return 0 if the tile is a land tile */
uint8_t terrain_type = (HasTileWaterClass(tile) ? (GetWaterClass(tile) + 1) & 3 : 0) << 5 | GetTerrainType(tile) << 2 | (tile_type == MP_WATER ? 1 : 0) << 1;