(svn r14280) -Codechange: use IsRailWaypointTile() instead of IsTileType() and IsRailWaypoint() checks at several places

This commit is contained in:
smatz
2008-09-09 12:26:25 +00:00
parent a527d237aa
commit f503c7c99e
6 changed files with 17 additions and 12 deletions

View File

@@ -309,8 +309,7 @@ CommandCost RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove)
Waypoint *wp;
/* Make sure it's a waypoint */
if (!IsTileType(tile, MP_RAILWAY) ||
!IsRailWaypoint(tile) ||
if (!IsRailWaypointTile(tile) ||
(!CheckTileOwnership(tile) && _current_player != OWNER_WATER) ||
!EnsureNoVehicleOnGround(tile)) {
return CMD_ERROR;