mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-28 01:04:50 +01:00
Prevent large scenery selected tiles invalidating every frame
This commit is contained in:
@@ -1899,18 +1899,6 @@ namespace OpenRCT2::Ui::Windows
|
||||
}
|
||||
|
||||
auto* sceneryEntry = ObjectManager::GetObjectEntry<LargeSceneryEntry>(selection.EntryIndex);
|
||||
MapSelection::ClearSelectedTiles();
|
||||
|
||||
for (auto& tile : sceneryEntry->tiles)
|
||||
{
|
||||
CoordsXY tileLocation = { tile.offset };
|
||||
auto rotatedTileCoords = tileLocation.Rotate(direction);
|
||||
|
||||
rotatedTileCoords.x += mapTile.x;
|
||||
rotatedTileCoords.y += mapTile.y;
|
||||
|
||||
MapSelection::AddSelectedTile(rotatedTileCoords);
|
||||
}
|
||||
|
||||
gMapSelectFlags.set(MapSelectFlag::enableConstruct);
|
||||
|
||||
@@ -1922,6 +1910,12 @@ namespace OpenRCT2::Ui::Windows
|
||||
return;
|
||||
}
|
||||
|
||||
MapSelection::ClearSelectedTiles();
|
||||
for (auto& tile : sceneryEntry->tiles)
|
||||
{
|
||||
MapSelection::AddSelectedTile(mapTile + tile.offset.Rotate(direction));
|
||||
}
|
||||
|
||||
SceneryRemoveGhostToolPlacement();
|
||||
|
||||
gSceneryPlaceObject.SceneryType = SCENERY_TYPE_LARGE;
|
||||
|
||||
Reference in New Issue
Block a user