Fix ghost scenery not being removed

This commit is contained in:
ζeh Matt 2021-10-29 20:11:03 +03:00
parent 16ce6641f0
commit 00c5a440be
No known key found for this signature in database
GPG Key ID: 18CE582C71A225B0
1 changed files with 5 additions and 1 deletions

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;
}