diff options
author | tron <tron@openttd.org> | 2006-06-19 09:40:08 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-19 09:40:08 +0000 |
commit | c61b617a169d2e98648f11288e45bab0080d9cc5 (patch) | |
tree | 47f012ae71ee6c2ff057cfc55e05d5f99ca3678a | |
parent | 072312b538efc9cd70d87f09e4b20f8ceca5090d (diff) | |
download | openttd-c61b617a169d2e98648f11288e45bab0080d9cc5.tar.xz |
(svn r5314) -Regression: When road works started on a road tile with barren roadside the road side turned into trees (caused by r4258)
-rw-r--r-- | road_map.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/road_map.h b/road_map.h index f725d65fe..73d386cb1 100644 --- a/road_map.h +++ b/road_map.h @@ -143,7 +143,11 @@ static inline void StartRoadWorks(TileIndex t) { assert(!HasRoadWorks(t)); /* Remove any trees or lamps in case or roadwork */ - SetGroundType(t, (RoadGroundType)(min(GetGroundType(t), RGT_PAVED) + RGT_ROADWORK_OFFSET)); + switch (GetGroundType(t)) { + case RGT_BARREN: + case RGT_GRASS: SetGroundType(t, RGT_ROADWORK_GRASS); break; + default: SetGroundType(t, RGT_ROADWORK_PAVED); break; + } } static inline void TerminateRoadWorks(TileIndex t) |