summaryrefslogtreecommitdiff
path: root/src/rail_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rail_map.h')
-rw-r--r--src/rail_map.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/rail_map.h b/src/rail_map.h
index 2789b419a..8c436d055 100644
--- a/src/rail_map.h
+++ b/src/rail_map.h
@@ -168,6 +168,17 @@ static inline DiagDirection GetRailDepotDirection(TileIndex t)
return (DiagDirection)GB(_m[t].m5, 0, 2);
}
+/**
+ * Returns the track of a depot, ignoring direction
+ * @pre IsRailDepotTile(t)
+ * @param t the tile to get the depot track from
+ * @return the track of the depot
+ */
+static inline Track GetRailDepotTrack(TileIndex t)
+{
+ return DiagDirToDiagTrack(GetRailDepotDirection(t));
+}
+
/**
* Returns the axis of the waypoint