1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

Remove some direct usage of TileElement->type

This commit is contained in:
Michael Steenbeek
2018-10-03 11:07:50 +02:00
parent 882a65e4c0
commit 02cfffcb1e
2 changed files with 3 additions and 3 deletions

View File

@@ -245,8 +245,8 @@ static void mapgen_place_tree(int32_t type, int32_t x, int32_t y)
tileElement = tile_element_insert(x, y, surfaceZ, (1 | 2 | 4 | 8));
assert(tileElement != nullptr);
tileElement->clearance_height = surfaceZ + (sceneryEntry->small_scenery.height >> 3);
tileElement->type = TILE_ELEMENT_TYPE_SMALL_SCENERY | (util_rand() & 3);
tileElement->SetType(TILE_ELEMENT_TYPE_SMALL_SCENERY);
tileElement->SetDirection(util_rand() & 3);
SmallSceneryElement* sceneryElement = tileElement->AsSmallScenery();
sceneryElement->SetEntryIndex(type);
sceneryElement->SetAge(0);

View File

@@ -967,7 +967,7 @@ int32_t tile_inspector_track_set_chain(
if (tileElement->AsTrack()->HasChain() != setChain)
{
tileElement->type ^= TRACK_ELEMENT_TYPE_FLAG_CHAIN_LIFT;
tileElement->AsTrack()->SetHasChain(setChain);
}
}
}