Remove some direct usage of TileElement->type

This commit is contained in:
Michael Steenbeek committed 2018-10-03 12:18:21 +02:00
1 parent 882a65e4c0
commit 02cfffcb1e
2 files changed
+3 -3

No files matched your search

+2 -2
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);
+1 -1
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);
}
}
}