diff options
Diffstat (limited to 'src/yapf')
-rw-r--r-- | src/yapf/follow_track.hpp | 8 | ||||
-rw-r--r-- | src/yapf/yapf_destrail.hpp | 2 | ||||
-rw-r--r-- | src/yapf/yapf_road.cpp | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/yapf/follow_track.hpp b/src/yapf/follow_track.hpp index afde47dd7..0b5608fb4 100644 --- a/src/yapf/follow_track.hpp +++ b/src/yapf/follow_track.hpp @@ -196,7 +196,7 @@ protected: } // road depots can be also left in one direction only - if (IsRoadTT() && IsTileDepotType(m_old_tile, TT())) { + if (IsRoadTT() && IsDepotTypeTile(m_old_tile, TT())) { DiagDirection exitdir = GetRoadDepotDirection(m_old_tile); if (exitdir != m_exitdir) { m_err = EC_NO_WAY; @@ -226,7 +226,7 @@ protected: } // road and rail depots can also be entered from one direction only - if (IsRoadTT() && IsTileDepotType(m_new_tile, TT())) { + if (IsRoadTT() && IsDepotTypeTile(m_new_tile, TT())) { DiagDirection exitdir = GetRoadDepotDirection(m_new_tile); if (ReverseDiagDir(exitdir) != m_exitdir) { m_err = EC_NO_WAY; @@ -238,7 +238,7 @@ protected: return false; } } - if (IsRailTT() && IsTileDepotType(m_new_tile, TT())) { + if (IsRailTT() && IsDepotTypeTile(m_new_tile, TT())) { DiagDirection exitdir = GetRailDepotDirection(m_new_tile); if (ReverseDiagDir(exitdir) != m_exitdir) { m_err = EC_NO_WAY; @@ -305,7 +305,7 @@ protected: FORCEINLINE bool ForcedReverse() { // rail and road depots cause reversing - if (!IsWaterTT() && IsTileDepotType(m_old_tile, TT())) { + if (!IsWaterTT() && IsDepotTypeTile(m_old_tile, TT())) { DiagDirection exitdir = IsRailTT() ? GetRailDepotDirection(m_old_tile) : GetRoadDepotDirection(m_old_tile); if (exitdir != m_exitdir) { // reverse diff --git a/src/yapf/yapf_destrail.hpp b/src/yapf/yapf_destrail.hpp index 1de192334..b666999c3 100644 --- a/src/yapf/yapf_destrail.hpp +++ b/src/yapf/yapf_destrail.hpp @@ -43,7 +43,7 @@ public: /// Called by YAPF to detect if node ends in the desired destination FORCEINLINE bool PfDetectDestination(TileIndex tile, Trackdir td) { - bool bDest = IsTileDepotType(tile, TRANSPORT_RAIL); + bool bDest = IsDepotTypeTile(tile, TRANSPORT_RAIL); return bDest; } diff --git a/src/yapf/yapf_road.cpp b/src/yapf/yapf_road.cpp index efa6bb70d..81a6eeb73 100644 --- a/src/yapf/yapf_road.cpp +++ b/src/yapf/yapf_road.cpp @@ -87,7 +87,7 @@ public: if (v->current_order.IsType(OT_GOTO_STATION) && tile == v->dest_tile) break; // stop if we have just entered the depot - if (IsTileDepotType(tile, TRANSPORT_ROAD) && trackdir == DiagdirToDiagTrackdir(ReverseDiagDir(GetRoadDepotDirection(tile)))) { + if (IsDepotTypeTile(tile, TRANSPORT_ROAD) && trackdir == DiagdirToDiagTrackdir(ReverseDiagDir(GetRoadDepotDirection(tile)))) { // next time we will reverse and leave the depot break; } @@ -148,7 +148,7 @@ public: /// Called by YAPF to detect if node ends in the desired destination FORCEINLINE bool PfDetectDestination(Node& n) { - bool bDest = IsTileDepotType(n.m_segment_last_tile, TRANSPORT_ROAD); + bool bDest = IsDepotTypeTile(n.m_segment_last_tile, TRANSPORT_ROAD); return bDest; } @@ -370,7 +370,7 @@ public: // get found depot tile Node *n = Yapf().GetBestNode(); TileIndex depot_tile = n->m_segment_last_tile; - assert(IsTileDepotType(depot_tile, TRANSPORT_ROAD)); + assert(IsDepotTypeTile(depot_tile, TRANSPORT_ROAD)); Depot* ret = GetDepotByTile(depot_tile); return ret; } @@ -439,7 +439,7 @@ Depot* YapfFindNearestRoadDepot(const Vehicle *v) return NULL; // handle the case when our vehicle is already in the depot tile - if (IsTileType(tile, MP_ROAD) && IsTileDepotType(tile, TRANSPORT_ROAD)) { + if (IsTileType(tile, MP_ROAD) && IsDepotTypeTile(tile, TRANSPORT_ROAD)) { // only what we need to return is the Depot* return GetDepotByTile(tile); } |