1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 23:04:36 +01:00

Use BannerElement instead of TileElement

This commit is contained in:
Gymnasiast
2021-04-03 22:07:11 +02:00
parent ea961aed93
commit 943e89d5a6

View File

@@ -76,7 +76,7 @@ class BannerWindow final : public Window
private:
Banner* _banner;
CoordsXYZ _bannerViewPos;
TileElement* _tileElement = nullptr;
BannerElement* _tileElement = nullptr;
void CreateViewport()
{
@@ -99,7 +99,7 @@ private:
{
if ((tileElement->GetType() == TILE_ELEMENT_TYPE_BANNER) && (tileElement->AsBanner()->GetIndex() == number))
{
_tileElement = tileElement;
_tileElement = tileElement->AsBanner();
return;
}
if (tileElement->IsLastForTile())
@@ -173,7 +173,7 @@ public:
case WIDX_BANNER_DEMOLISH:
{
auto bannerRemoveAction = BannerRemoveAction(
{ _banner->position.ToCoordsXY(), _tileElement->GetBaseZ(), _tileElement->AsBanner()->GetPosition() });
{ _banner->position.ToCoordsXY(), _tileElement->GetBaseZ(), _tileElement->GetPosition() });
GameActions::Execute(&bannerRemoveAction);
break;
}