1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-25 15:54:31 +01:00

Refactor SmallSceneryEntry (#14815)

This commit is contained in:
Duncan
2021-06-04 02:14:41 +01:00
committed by GitHub
parent 8fc7e06116
commit 12c5484f44
23 changed files with 205 additions and 203 deletions

View File

@@ -173,7 +173,7 @@ static bool map_animation_invalidate_small_scenery(const CoordsXYZ& loc)
if (tileElement->IsGhost())
continue;
auto sceneryEntry = tileElement->AsSmallScenery()->GetEntry();
auto* sceneryEntry = tileElement->AsSmallScenery()->GetEntry();
if (sceneryEntry == nullptr)
continue;
@@ -640,8 +640,8 @@ void AutoCreateMapAnimations()
case TILE_ELEMENT_TYPE_SMALL_SCENERY:
{
auto sceneryEl = el->AsSmallScenery();
auto entry = sceneryEl->GetEntry();
if (entry != nullptr && scenery_small_entry_has_flag(entry, SMALL_SCENERY_FLAG_ANIMATED))
auto* sceneryEntry = sceneryEl->GetEntry();
if (sceneryEntry != nullptr && scenery_small_entry_has_flag(sceneryEntry, SMALL_SCENERY_FLAG_ANIMATED))
{
map_animation_create(MAP_ANIMATION_TYPE_SMALL_SCENERY, loc);
}