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:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user