diff options
author | frosch <frosch@openttd.org> | 2008-05-24 19:36:20 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2008-05-24 19:36:20 +0000 |
commit | 8f104a2e971822e548d210bcd83f84057e54702d (patch) | |
tree | c397ff33001e474f450c64ea28b740db9fd01e81 /src/road_map.h | |
parent | ca244cbd06c071ee625f47ddf80d055bfcab072f (diff) | |
download | openttd-8f104a2e971822e548d210bcd83f84057e54702d.tar.xz |
(svn r13233) -Fix: Replace some (incorrect) evaluations of TileOwner by RoadOwner.
-Fix: Before evaluating RoadOwner, check if the roadtype is present.
-Fix: Some places assumed that MP_ROAD means normal street.
Diffstat (limited to 'src/road_map.h')
-rw-r--r-- | src/road_map.h | 6 |
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 |