# HG changeset patch # User celestar # Date 1144848332 0 # Node ID 29d16a8c45cbdc0b74e4653352336a0fa1ffea8c # Parent b2d1458b765367931a47787ea3d30d2320d1c593 (svn r4386) -Codechange: Add and make use of IsCustomWaypoint diff -r b2d1458b7653 -r 29d16a8c45cb rail_cmd.c --- 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); diff -r b2d1458b7653 -r 29d16a8c45cb rail_map.h --- 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;