(svn r3210) -Codechange: use IsRailWaypoint where possible (instead of magicnumbers)

-Codechange: IsRailWaypoint should take 'tile', not 'm5'
This commit is contained in:
truelight
2005-11-16 14:41:01 +00:00
parent b739674307
commit c1b012171d
6 changed files with 12 additions and 11 deletions

View File

@@ -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))