summaryrefslogtreecommitdiff
path: root/src/road_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/road_map.h')
-rw-r--r--src/road_map.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/road_map.h b/src/road_map.h
index 305a1ab25..756e3fcb7 100644
--- a/src/road_map.h
+++ b/src/road_map.h
@@ -187,6 +187,12 @@ static inline void SetRoadOwner(TileIndex t, RoadType rt, Owner o)
}
}
+static inline bool IsRoadOwner(TileIndex t, RoadType rt, Owner o)
+{
+ assert(HasTileRoadType(t, rt));
+ return (GetRoadOwner(t, rt) == o);
+}
+
/** Which directions are disallowed ? */
enum DisallowedRoadDirections {
DRD_NONE, ///< None of the directions are disallowed