From f0e39a7953a3a9509890cfdb381d161c605040df Mon Sep 17 00:00:00 2001 From: peter1138 Date: Tue, 25 Mar 2008 12:10:13 +0000 Subject: (svn r12410) -Codechange: abstract out the test for catenary on electric rails --- src/rail.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/rail.h') diff --git a/src/rail.h b/src/rail.h index eb31bb4ab..53b3a1337 100644 --- a/src/rail.h +++ b/src/rail.h @@ -183,6 +183,17 @@ void DrawDefaultWaypointSprite(int x, int y, RailType railtype); void *EnsureNoTrainOnTrackProc(Vehicle *v, void *data); int TicksToLeaveDepot(const Vehicle *v); + +/** + * Test if a rail type has catenary + * @param rt Rail type to test + */ +static inline bool HasCatenary(RailType rt) +{ + return rt == RAILTYPE_ELECTRIC; +} + + /** * Draws overhead wires and pylons for electric railways. * @param ti The TileInfo struct of the tile being drawn -- cgit v1.2.3-54-g00ecf