(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.
This commit is contained in:
frosch
2008-05-24 19:36:20 +00:00
parent c34b458ace
commit 6e7a7412cd
6 changed files with 34 additions and 28 deletions

View File

@@ -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