summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--road_map.h6
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)