Merge branch 'master' into jgrpp
# Conflicts: # .github/workflows/ci-build.yml # .github/workflows/codeql.yml # .github/workflows/release-linux.yml # .github/workflows/release-macos.yml # .github/workflows/release-windows.yml # src/map.cpp # src/music/midifile.hpp # src/order_cmd.cpp # src/order_gui.cpp # src/pathfinder/yapf/yapf_rail.cpp # src/pbs.cpp # src/saveload/afterload.cpp # src/saveload/saveload.h # src/saveload/vehicle_sl.cpp # src/script/api/script_text.cpp # src/ship_cmd.cpp # src/train_cmd.cpp # src/vehicle.cpp # src/vehicle_base.h # src/vehicle_func.h # src/vehicle_gui.cpp # src/vehicle_gui_base.h # src/viewport.cpp # src/waypoint_cmd.cpp
This commit is contained in:
@@ -68,7 +68,7 @@ static TileIndex GetOtherAqueductEnd(TileIndex tile_from, TileIndex *tile_to = n
|
||||
* complains about the wrong slope instead of the ends not matching up.
|
||||
* Make sure the coordinate is always a valid tile within the map, so we
|
||||
* don't go "off" the map. That would cause the wrong error message. */
|
||||
if (!IsValidDiagDirection(dir)) return TILE_ADDXY(tile_from, TileX(tile_from) > 2 ? -1 : 1, 0);
|
||||
if (!IsValidDiagDirection(dir)) return TileAddXY(tile_from, TileX(tile_from) > 2 ? -1 : 1, 0);
|
||||
|
||||
/* Direction the aqueduct is built to. */
|
||||
TileIndexDiff offset = TileOffsByDiagDir(ReverseDiagDir(dir));
|
||||
@@ -77,7 +77,7 @@ static TileIndex GetOtherAqueductEnd(TileIndex tile_from, TileIndex *tile_to = n
|
||||
|
||||
TileIndex endtile = tile_from;
|
||||
for (int length = 0; IsValidTile(endtile) && TileX(endtile) != 0 && TileY(endtile) != 0; length++) {
|
||||
endtile = TILE_ADD(endtile, offset);
|
||||
endtile = TileAdd(endtile, offset);
|
||||
|
||||
if (length > max_length) break;
|
||||
|
||||
|
Reference in New Issue
Block a user