src/npf.cpp
changeset 10221 faef62283f5f
parent 10213 23cfd330ccac
child 10222 b6919c94cc77
--- a/src/npf.cpp	Thu Apr 17 18:12:53 2008 +0000
+++ b/src/npf.cpp	Thu Apr 17 18:24:45 2008 +0000
@@ -231,14 +231,14 @@
 	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 @@
 	 *      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 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 */
 	}