1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-02-03 09:30:10 +01:00

Codechange: use INVALID_TOWN instead of 0 to denote 'not applicable'

This commit is contained in:
Rubidium
2025-01-19 15:14:25 +01:00
committed by rubidium42
parent 00367aa391
commit 0aa9faf187
8 changed files with 12 additions and 12 deletions

View File

@@ -165,7 +165,7 @@ void ConnectRoadToStructure(TileIndex tile, DiagDirection direction)
/* if there is a roadpiece just outside of the station entrance, build a connecting route */
if (IsNormalRoadTile(tile)) {
if (GetRoadBits(tile, GetRoadTramType(_cur_roadtype)) != ROAD_NONE) {
Command<CMD_BUILD_ROAD>::Post(tile, DiagDirToRoadBits(ReverseDiagDir(direction)), _cur_roadtype, DRD_NONE, 0);
Command<CMD_BUILD_ROAD>::Post(tile, DiagDirToRoadBits(ReverseDiagDir(direction)), _cur_roadtype, DRD_NONE, INVALID_TOWN);
}
}
}