1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-23 20:24:12 +01:00

Codechange: Use TileOffsByAxis(...) in more places (#13026)

This commit is contained in:
SamuXarick
2024-10-24 20:58:15 +01:00
committed by GitHub
parent c9819f8957
commit d5a13fb9f4
8 changed files with 9 additions and 9 deletions

View File

@@ -439,7 +439,7 @@ CommandCost CmdBuildBridge(DoCommandFlag flags, TileIndex tile_end, TileIndex ti
}
}
TileIndexDiff delta = (direction == AXIS_X ? TileDiffXY(1, 0) : TileDiffXY(0, 1));
TileIndexDiff delta = TileOffsByAxis(direction);
for (TileIndex tile = tile_start + delta; tile != tile_end; tile += delta) {
if (GetTileMaxZ(tile) > z_start) return_cmd_error(STR_ERROR_BRIDGE_TOO_LOW_FOR_TERRAIN);