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 | bba2109b228b40867a04290ab9986a8dd65ee07d (patch) | |
tree | 47f012ae71ee6c2ff057cfc55e05d5f99ca3678a | |
parent | fc4a046fe23b2727ac1ab7a6590450b48f0e01d9 (diff) | |
download | openttd-bba2109b228b40867a04290ab9986a8dd65ee07d.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) |