Fix ghost scenery not being removed

This commit is contained in:
ζeh Matt committed 2021-10-29 20:11:03 +03:00
1 parent 16ce6641f0
commit 00c5a440be
1 file changed
+5 -1
+5 -1
View File
@@ -1339,7 +1339,11 @@ static GameActions::Result::Ptr TrackDesignPlaceAllScenery(
auto placementRes = TrackDesignPlaceSceneryElement(tds, mapCoord, mode, scenery, rotation, origin.z);
if (placementRes->Error != GameActions::Status::Ok)
{
return placementRes;
// Allow operation to fail when its removing ghosts.
if (tds.PlaceOperation != PTD_OPERATION_REMOVE_GHOST)
{
return placementRes;
}
}
cost += placementRes->Cost;
}