Fix #2485: Hide Vertical Faces not applied to water

This commit is contained in:
pizza2004 2020-02-23 13:32:57 -07:00 committed by GitHub
parent 18f60fa987
commit 57605f36e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 11 deletions

View File

@ -81,6 +81,7 @@ The following people are not part of the development team, but have been contrib
* (Xkeeper0) - Improved banner tooltips; multiplayer status in toolbar.
* Kevin Strehl (bitman2049) - Tile inspector keybindings
* Anton Scharnowski (scrapes) - Added Scenery Scatter Options Window.
* Chad Ian Anderson (pizza2004) - Added New Game option, bug fixes, misc.
## Bug fixes
* (halfbro)

View File

@ -8,6 +8,7 @@
- Feature: [#10189] Make Track Designs work in multiplayer.
- Feature: [#10357] Added window for scenery scatter tool, allowing for area and density selection.
- Change: [#1164] Use available translations for shortcut key bindings.
- Fix: [#2485] Hide Vertical Faces not applied to the edges of water.
- Fix: [#5249] No collision detection when building ride entrance at heights > 85.5m.
- Fix: [#7784] Vehicle tab takes 1st car colour instead of tab_vehicle's colour.
- Fix: [#7854] Cannot build a custom spiral roller coaster design.

View File

@ -1281,18 +1281,21 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
paint_attach_to_previous_ps(session, SPR_WATER_OVERLAY + image_offset, 0, 0);
// This wasn't in the original, but the code depended on globals that were only set in a different conditional
const uint32_t edgeStyle = tileElement->AsSurface()->GetEdgeStyle();
// end new code
if (!(session->ViewFlags & VIEWPORT_FLAG_HIDE_VERTICAL))
{
// This wasn't in the original, but the code depended on globals that were only set in a different conditional
const uint32_t edgeStyle = tileElement->AsSurface()->GetEdgeStyle();
// end new code
viewport_surface_draw_water_side_top(
session, EDGE_TOPLEFT, waterHeight / 16, edgeStyle, tileDescriptors[0], tileDescriptors[3]);
viewport_surface_draw_water_side_top(
session, EDGE_TOPRIGHT, waterHeight / 16, edgeStyle, tileDescriptors[0], tileDescriptors[4]);
viewport_surface_draw_water_side_bottom(
session, EDGE_BOTTOMLEFT, waterHeight / 16, edgeStyle, tileDescriptors[0], tileDescriptors[1]);
viewport_surface_draw_water_side_bottom(
session, EDGE_BOTTOMRIGHT, waterHeight / 16, edgeStyle, tileDescriptors[0], tileDescriptors[2]);
viewport_surface_draw_water_side_top(
session, EDGE_TOPLEFT, waterHeight / 16, edgeStyle, tileDescriptors[0], tileDescriptors[3]);
viewport_surface_draw_water_side_top(
session, EDGE_TOPRIGHT, waterHeight / 16, edgeStyle, tileDescriptors[0], tileDescriptors[4]);
viewport_surface_draw_water_side_bottom(
session, EDGE_BOTTOMLEFT, waterHeight / 16, edgeStyle, tileDescriptors[0], tileDescriptors[1]);
viewport_surface_draw_water_side_bottom(
session, EDGE_BOTTOMRIGHT, waterHeight / 16, edgeStyle, tileDescriptors[0], tileDescriptors[2]);
}
}
}