summaryrefslogtreecommitdiff
path: root/src/npf.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-04-17 18:24:45 +0000
committersmatz <smatz@openttd.org>2008-04-17 18:24:45 +0000
commit059e94e355c9172a42b70ff20b4b8a87dd4889ae (patch)
tree1d21e0ab2e3402600dc144e6cfc0d1e0b5725da1 /src/npf.cpp
parente098b50379219aeb0b8d22d652a3de514759eb3d (diff)
downloadopenttd-059e94e355c9172a42b70ff20b4b8a87dd4889ae.tar.xz
(svn r12753) -Codechange: do not use IsDepotTypeTile() where simpler function can be used
Diffstat (limited to 'src/npf.cpp')
-rw-r--r--src/npf.cpp12
1 files changed, 6 insertions, 6 deletions
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 */
}