station.h
changeset 2617 a9e1a187de99
parent 2548 97ada3bd2702
child 2625 66b3d632dcd2
--- a/station.h	Mon Nov 07 17:31:21 2005 +0000
+++ b/station.h	Mon Nov 07 23:20:47 2005 +0000
@@ -320,6 +320,11 @@
 	return IsTileType(tile, MP_STATION) && _m[tile].m5 == 0x52;
 }
 
+static inline bool TileBelongsToRailStation(const Station *st, TileIndex tile)
+{
+	return IsTileType(tile, MP_STATION) && _m[tile].m2 == st->index && _m[tile].m5 < 8;
+}
+
 /* Get's the direction the station exit points towards. Ie, returns 0 for a
  * station with the exit NE. */
 static inline byte GetRoadStationDir(TileIndex tile)