From 8ffb93c358c80fc24e349ad232648087508deec6 Mon Sep 17 00:00:00 2001 From: frosch Date: Fri, 15 May 2009 16:07:36 +0000 Subject: (svn r16311) -Fix: (Get|Set)TrackBits() is only valid for RAIL_TILE_NORMAL and _SIGNALS. --- src/ai/api/ai_rail.cpp | 1 + src/ai/api/ai_rail.hpp | 1 + 2 files changed, 2 insertions(+) (limited to 'src/ai/api') diff --git a/src/ai/api/ai_rail.cpp b/src/ai/api/ai_rail.cpp index 7719d5576..b067b0904 100644 --- a/src/ai/api/ai_rail.cpp +++ b/src/ai/api/ai_rail.cpp @@ -203,6 +203,7 @@ if (IsRailWaypointTile(tile)) return ::GetRailWaypointBits(tile); if (IsRailStationTile(tile)) return ::TrackToTrackBits(::GetRailStationTrack(tile)); if (IsLevelCrossingTile(tile)) return ::GetCrossingRailBits(tile); + if (IsRailDepotTile(tile)) return ::TRACK_BIT_NONE; return ::GetTrackBits(tile); } diff --git a/src/ai/api/ai_rail.hpp b/src/ai/api/ai_rail.hpp index 5ea5ad2a4..a16c27e1e 100644 --- a/src/ai/api/ai_rail.hpp +++ b/src/ai/api/ai_rail.hpp @@ -293,6 +293,7 @@ public: /** * Get all RailTracks on the given tile. + * @note A depot has no railtracks. * @param tile The tile to check. * @pre IsRailTile(tile). * @return A bitmask of RailTrack with all RailTracks on the tile. -- cgit v1.2.3-70-g09d2