From 059e94e355c9172a42b70ff20b4b8a87dd4889ae Mon Sep 17 00:00:00 2001 From: smatz Date: Thu, 17 Apr 2008 18:24:45 +0000 Subject: (svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used --- src/npf.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/npf.cpp') diff --git a/src/npf.cpp b/src/npf.cpp index 01c5c00c3..b0f762c25 100644 --- a/src/npf.cpp +++ b/src/npf.cpp @@ -231,14 +231,14 @@ static void NPFMarkTile(TileIndex tile) switch (GetTileType(tile)) { case MP_RAILWAY: /* DEBUG: mark visited tiles by mowing the grass under them ;-) */ - if (!IsDepotTypeTile(tile, TRANSPORT_RAIL)) { + if (!IsRailDepot(tile)) { SetRailGroundType(tile, RAIL_GROUND_BARREN); MarkTileDirtyByTile(tile); } break; case MP_ROAD: - if (!IsDepotTypeTile(tile, TRANSPORT_ROAD)) { + if (!IsRoadDepot(tile)) { SetRoadside(tile, ROADSIDE_BARREN); MarkTileDirtyByTile(tile); } @@ -397,7 +397,7 @@ static int32 NPFRailPathCost(AyStar* as, AyStarNode* current, OpenListNode* pare * curves should be taken into account, as this affects the speed limit. */ /* Check for reverse in depot */ - if (IsDepotTypeTile(tile, TRANSPORT_RAIL) && as->EndNodeCheck(as, &new_node) != AYSTAR_FOUND_END_NODE) { + if (IsRailDepotTile(tile) && as->EndNodeCheck(as, &new_node) != AYSTAR_FOUND_END_NODE) { /* Penalise any depot tile that is not the last tile in the path. This * _should_ penalise every occurence of reversing in a depot (and only * that) */ @@ -464,9 +464,9 @@ static void NPFSaveTargetData(AyStar* as, OpenListNode* current) */ static bool CanEnterTileOwnerCheck(Owner owner, TileIndex tile, DiagDirection enterdir) { - if (IsTileType(tile, MP_RAILWAY) || /* Rail tile (also rail depot) */ - IsRailwayStationTile(tile) || /* Rail station tile */ - IsDepotTypeTile(tile, TRANSPORT_ROAD) || /* Road depot tile */ + if (IsTileType(tile, MP_RAILWAY) || /* Rail tile (also rail depot) */ + IsRailwayStationTile(tile) || /* Rail station tile */ + IsRoadDepotTile(tile) || /* Road depot tile */ IsStandardRoadStopTile(tile)) { /* Road station tile (but not drive-through stops) */ return IsTileOwner(tile, owner); /* You need to own these tiles entirely to use them */ } -- cgit v1.2.3-54-g00ecf