mirror of https://github.com/OpenRCT2/OpenRCT2.git
By comparing water level and clipping height, we just remove water from rendering but keep the surface tiles at the bottom
This commit is contained in:
parent
8a4df108ba
commit
be824e941f
|
@ -15,6 +15,7 @@
|
|||
- Fix: [#5904] Empty errors on tile inspector base height change.
|
||||
- Fix: [#6086] Cannot install existing track design with another name.
|
||||
- Fix: [#7443] Construction arrows pulse at irregular intervals.
|
||||
- Fix: [#7518] Water isn't cut down by view clipping tool.
|
||||
- Fix: [#7748] Tooltips would not timeout for normal UI elements.
|
||||
- Fix: [#8015] RCT2 files are not found when put into the OpenRCT2 folder.
|
||||
- Fix: [#8957] Error title missing when building with insufficient funds
|
||||
|
|
|
@ -1288,16 +1288,16 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
|
|||
std::memcpy(session->RightTunnels, backupRightTunnels, sizeof(tunnel_entry) * TUNNEL_MAX_COUNT);
|
||||
}
|
||||
|
||||
if (tileElement->AsSurface()->GetWaterHeight() > 0)
|
||||
const uint16_t waterHeight = tileElement->AsSurface()->GetWaterHeight();
|
||||
const bool waterGetsClipped = (session->ViewFlags & VIEWPORT_FLAG_CLIP_VIEW) && (waterHeight > gClipHeight * COORDS_Z_STEP);
|
||||
|
||||
if (waterHeight > 0 && !gTrackDesignSaveMode && !waterGetsClipped)
|
||||
{
|
||||
// loc_6615A9: (water height)
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_WATER;
|
||||
|
||||
const uint16_t localHeight = height + 16;
|
||||
const uint16_t waterHeight = tileElement->AsSurface()->GetWaterHeight();
|
||||
|
||||
if (!gTrackDesignSaveMode)
|
||||
{
|
||||
session->WaterHeight = waterHeight;
|
||||
|
||||
int32_t image_offset = 0;
|
||||
|
@ -1328,7 +1328,6 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
|
|||
session, EDGE_TOPRIGHT, waterHeight, edgeStyle, tileDescriptors[0], tileDescriptors[4]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((tileElement->AsSurface()->GetParkFences()) && !gTrackDesignSaveMode)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue