mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2026-05-06 07:56:46 -04:00
Fix tiles mistakenly culled when elements below water and none above (#26410)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
- Fix: [#26352] Large scenery items are incorrectly labelled as 'banners' in the tile inspector.
|
||||
- Fix: [#26352] The label for path additions is using the wrong text colour in the tile inspector.
|
||||
- Fix: [#26360] Inverted Lay-down Roller Coaster helices are invisible when loading old saves.
|
||||
- Fix: [#26410] Tiles with water can draw incorrectly when there is something underwater and nothing above water.
|
||||
|
||||
0.5.0 (2026-04-12)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
@@ -188,19 +188,17 @@ static void PaintTileElementBase(PaintSession& session, const CoordsXY& origCoor
|
||||
if (screenMinY + 52 <= session.rt.WorldY())
|
||||
return;
|
||||
|
||||
const TileElement* element = tile_element; // push tile_element
|
||||
|
||||
uint16_t maxHeight = 0;
|
||||
do
|
||||
{
|
||||
maxHeight = std::max(maxHeight, static_cast<uint16_t>(element->GetClearanceZ()));
|
||||
} while (!(element++)->IsLastForTile());
|
||||
|
||||
element--;
|
||||
|
||||
if (element->GetType() == TileElementType::Surface && (element->AsSurface()->GetWaterHeight() > 0))
|
||||
{
|
||||
maxHeight = std::max(maxHeight, static_cast<uint16_t>(element->AsSurface()->GetWaterHeight()));
|
||||
const TileElement* element = tile_element;
|
||||
do
|
||||
{
|
||||
maxHeight = std::max(maxHeight, static_cast<uint16_t>(element->GetClearanceZ()));
|
||||
if (element->GetType() == TileElementType::Surface)
|
||||
{
|
||||
maxHeight = std::max(maxHeight, static_cast<uint16_t>(element->AsSurface()->GetWaterHeight()));
|
||||
}
|
||||
} while (!(element++)->IsLastForTile());
|
||||
}
|
||||
|
||||
if (partOfVirtualFloor)
|
||||
|
||||
Reference in New Issue
Block a user