Fix #18459: 'Highlight path issues' hides fences

This commit is contained in:
Hielke Morsink authored and Rik Smeets committed 2022-11-05 09:32:22 +01:00
1 parent 474e04f957
commit a1d35ec33d
2 files changed
+9 -15

No files matched your search

+1
View File
@@ -27,6 +27,7 @@
- Fix: [#18442] About window background is clickable.
- Fix: [#18449] [Plugin] Change type of listview widgets from 'scroll_view' to 'listview'.
- Fix: [#18453] Slow walking guests don't get across level crossings in time.
- Fix: [#18459] ‘Highlight path issues’ hides fences for paths with additions.
0.4.2 (2022-10-05)
------------------------------------------------------------------------
+8 -15
View File
@@ -729,8 +729,6 @@ static void sub_6A3F61(
if (dpi->zoom_level <= ZoomLevel{ 1 })
{
bool paintScenery = true;
if (!gTrackDesignSaveMode)
{
if (pathElement.HasAddition())
@@ -743,19 +741,16 @@ static void sub_6A3F61(
// Draw additional path bits (bins, benches, lamps, queue screens)
auto* pathAddEntry = pathElement.GetAdditionEntry();
bool drawAddition = true;
// Can be null if the object is not loaded.
if (pathAddEntry == nullptr)
if (pathAddEntry == nullptr
|| ((session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) && !(pathElement.IsBroken())
&& pathAddEntry->draw_type != PathBitDrawType::Bin))
{
paintScenery = false;
drawAddition = false;
}
else if (
(session.ViewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES) && !(pathElement.IsBroken())
&& pathAddEntry->draw_type != PathBitDrawType::Bin)
{
paintScenery = false;
}
else
if (drawAddition)
{
switch (pathAddEntry->draw_type)
{
@@ -791,9 +786,7 @@ static void sub_6A3F61(
// Redundant zoom-level check removed
if (paintScenery)
PathPaintFencesAndQueueBanners(
session, pathElement, height, connectedEdges, hasSupports, pathPaintInfo, imageTemplate);
PathPaintFencesAndQueueBanners(session, pathElement, height, connectedEdges, hasSupports, pathPaintInfo, imageTemplate);
}
// This is about tunnel drawing