(svn r5314) -Regression: When road works started on a road tile with barren roadside the road side turned into trees (caused by r4258)

This commit is contained in:
tron 2006-06-19 09:40:08 +00:00
parent 072312b538
commit c61b617a16

View File

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