--- a/rail_cmd.c Wed Apr 12 12:58:53 2006 +0000
+++ b/rail_cmd.c Wed Apr 12 13:25:32 2006 +0000
@@ -1308,7 +1308,7 @@
if (ti->tileh != 0) DrawFoundation(ti, ti->tileh);
- if (IsRailWaypoint(ti->tile) && HASBIT(_m[ti->tile].m3, 4)) {
+ if (IsRailWaypoint(ti->tile) && IsCustomWaypoint(ti->tile)) {
// look for customization
byte stat_id = GetWaypointByTile(ti->tile)->stat_id;
const StationSpec *stat = GetCustomStation(STAT_CLASS_WAYP, stat_id);
--- a/rail_map.h Wed Apr 12 12:58:53 2006 +0000
+++ b/rail_map.h Wed Apr 12 13:25:32 2006 +0000
@@ -144,6 +144,11 @@
CLRBIT(_m[t].m3, 4);
}
+static inline bool IsCustomWaypoint(TileIndex t)
+{
+ return HASBIT(_m[t].m3, 4);
+}
+
static inline Axis GetWaypointAxis(TileIndex t)
{
return HASBIT(_m[t].m5, 0) ? AXIS_Y : AXIS_X;