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:
@@ -157,7 +157,8 @@ private:
|
|||||||
|
|
||||||
auto bannerRemoveAction = BannerRemoveAction(
|
auto bannerRemoveAction = BannerRemoveAction(
|
||||||
{ x, y, tileElement->base_height * 8, tileElement->AsBanner()->GetPosition() });
|
{ 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);
|
GameActions::ExecuteNested(&bannerRemoveAction);
|
||||||
tileElement--;
|
tileElement--;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user