summaryrefslogtreecommitdiff
path: root/waypoint.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-11-16 14:41:01 +0000
committertruelight <truelight@openttd.org>2005-11-16 14:41:01 +0000
commitcd1ad247231e98e83298943ac661af0990058cf9 (patch)
tree214102297a7345bf5d6cf0849e439481b6c5fb1a /waypoint.c
parenta56ffc6a0fe807ff59c4b48e1837257761f6cfab (diff)
downloadopenttd-cd1ad247231e98e83298943ac661af0990058cf9.tar.xz
(svn r3210) -Codechange: use IsRailWaypoint where possible (instead of magicnumbers)
-Codechange: IsRailWaypoint should take 'tile', not 'm5'
Diffstat (limited to 'waypoint.c')
-rw-r--r--waypoint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/waypoint.c b/waypoint.c
index fd5c10e75..60b6c8735 100644
--- a/waypoint.c
+++ b/waypoint.c
@@ -261,7 +261,7 @@ int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove)
Waypoint *wp;
/* Make sure it's a waypoint */
- if (!IsTileType(tile, MP_RAILWAY) || !IsRailWaypoint(_m[tile].m5))
+ if (!IsTileType(tile, MP_RAILWAY) || !IsRailWaypoint(tile))
return CMD_ERROR;
if (!CheckTileOwnership(tile) && !(_current_player == OWNER_WATER))