1
0
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:
mix
2025-11-16 15:28:10 +00:00
parent 6085665dae
commit 32b32adffc

View File

@@ -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;