diff options
author | J0anJosep <juanjo.ng.83@gmail.com> | 2018-04-29 13:50:52 +0200 |
---|---|---|
committer | frosch <github@elsenhans.name> | 2018-04-30 18:55:04 +0200 |
commit | 79a551a83ceda50b1b95d2a5519dbcbc6f700d2b (patch) | |
tree | 7723211f8f91fe6cc90630dbef27931ae437922f /src/pathfinder | |
parent | 944f785be8e0d994552d96e2990232cba094efdd (diff) | |
download | openttd-79a551a83ceda50b1b95d2a5519dbcbc6f700d2b.tar.xz |
Codechange: Use TileAddBy(Diag)Dir when possible.
Diffstat (limited to 'src/pathfinder')
-rw-r--r-- | src/pathfinder/follow_track.hpp | 3 | ||||
-rw-r--r-- | src/pathfinder/yapf/yapf_ship.cpp | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/pathfinder/follow_track.hpp b/src/pathfinder/follow_track.hpp index 9f19b029c..d9a70b7fc 100644 --- a/src/pathfinder/follow_track.hpp +++ b/src/pathfinder/follow_track.hpp @@ -219,8 +219,7 @@ protected: } /* normal or station tile, do one step */ - TileIndexDiff diff = TileOffsByDiagDir(m_exitdir); - m_new_tile = TILE_ADD(m_old_tile, diff); + m_new_tile = TileAddByDiagDir(m_old_tile, m_exitdir); /* special handling for stations */ if (IsRailTT() && HasStationTileRail(m_new_tile)) { diff --git a/src/pathfinder/yapf/yapf_ship.cpp b/src/pathfinder/yapf/yapf_ship.cpp index e4b99462d..df6cd468c 100644 --- a/src/pathfinder/yapf/yapf_ship.cpp +++ b/src/pathfinder/yapf/yapf_ship.cpp @@ -69,7 +69,7 @@ public: } /* move back to the old tile/trackdir (where ship is coming from) */ - TileIndex src_tile = TILE_ADD(tile, TileOffsByDiagDir(ReverseDiagDir(enterdir))); + TileIndex src_tile = TileAddByDiagDir(tile, ReverseDiagDir(enterdir)); Trackdir trackdir = v->GetVehicleTrackdir(); assert(IsValidTrackdir(trackdir)); |