1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

Fix #9396. Pass the ghost flag to banner remove to prevent invalid removal.

Previously this would never have happened because the old code would do a scenery ghost removal before calling anything else. I think this is a better way of handling it though and don't want to revert to the old method
This commit is contained in:
duncanspumpkin
2019-06-11 18:40:41 +01:00
parent 17cc6a862d
commit 082f969fab

View File

@@ -157,7 +157,8 @@ private:
auto bannerRemoveAction = BannerRemoveAction(
{ x, y, tileElement->base_height * 8, tileElement->AsBanner()->GetPosition() });
bannerRemoveAction.SetFlags(GetFlags());
auto bannerFlags = GetFlags() | (tileElement->IsGhost() ? static_cast<uint32_t>(GAME_COMMAND_FLAG_GHOST) : 0);
bannerRemoveAction.SetFlags(bannerFlags);
GameActions::ExecuteNested(&bannerRemoveAction);
tileElement--;
}