From 943e89d5a6a8d18947e7d7a5bfc23a450d1a114a Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sat, 3 Apr 2021 22:07:11 +0200 Subject: [PATCH] Use BannerElement instead of TileElement --- src/openrct2-ui/windows/Banner.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openrct2-ui/windows/Banner.cpp b/src/openrct2-ui/windows/Banner.cpp index f0442ce136..a97a3ae8d5 100644 --- a/src/openrct2-ui/windows/Banner.cpp +++ b/src/openrct2-ui/windows/Banner.cpp @@ -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; }