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

@@ -1077,7 +1077,7 @@ static bool IsRoadAllowedHere(Town *t, TileIndex tile, DiagDirection dir)
* If that fails clear the land, and if that fails exit.
* This is to make sure that we can build a road here later. */
RoadType rt = GetTownRoadType();
if (Command<CMD_BUILD_ROAD>::Do(DC_AUTO | DC_NO_WATER, tile, (dir == DIAGDIR_NW || dir == DIAGDIR_SE) ? ROAD_Y : ROAD_X, rt, DRD_NONE, 0).Failed() &&
if (Command<CMD_BUILD_ROAD>::Do(DC_AUTO | DC_NO_WATER, tile, (dir == DIAGDIR_NW || dir == DIAGDIR_SE) ? ROAD_Y : ROAD_X, rt, DRD_NONE, INVALID_TOWN).Failed() &&
Command<CMD_LANDSCAPE_CLEAR>::Do(DC_AUTO | DC_NO_WATER, tile).Failed()) {
return false;
}