summaryrefslogtreecommitdiff
path: root/src/waypoint.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-03-01 13:35:40 +0000
committerrubidium <rubidium@openttd.org>2007-03-01 13:35:40 +0000
commit05fe6d2362fe8a7b657c30629d6883dbb5660b29 (patch)
tree0880b99a709837e01bdb6038d8179f7ed60b4986 /src/waypoint.h
parentef9b0bdd88fc39dea58b81950d3a43f6e839f2dd (diff)
downloadopenttd-05fe6d2362fe8a7b657c30629d6883dbb5660b29.tar.xz
(svn r8954) -Codechange: remove direct map accesses from non-map-accessor headers.
Diffstat (limited to 'src/waypoint.h')
-rw-r--r--src/waypoint.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/waypoint.h b/src/waypoint.h
index 75366fb18..7292a15f3 100644
--- a/src/waypoint.h
+++ b/src/waypoint.h
@@ -59,7 +59,7 @@ static inline void DeleteWaypoint(Waypoint *wp)
static inline Waypoint *GetWaypointByTile(TileIndex tile)
{
assert(IsTileType(tile, MP_RAILWAY) && IsRailWaypoint(tile));
- return GetWaypoint(_m[tile].m2);
+ return GetWaypoint(GetWaypointIndex(tile));
}
int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove);