From 0ce84204b73c5865053f50af0739ecbb97a105ec Mon Sep 17 00:00:00 2001 From: mdbckrtn Date: Fri, 30 Dec 2022 16:18:59 -0500 Subject: [PATCH] Fix #18911: Update mini golf fencing to draw correctly from all angles (#18946) * Fix #18911: Update mini golf fencing to draw on all four angles SW and SE facing fences were not being drawn correctly due to (seemingly) a typo that caused the game to only check for NW and NE facing fencing when setting up fences for drawing. Ensuring PaintMiniGolfStation checks all four angles resolves the issue. --- distribution/changelog.txt | 1 + src/openrct2/ride/gentle/MiniGolf.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 83fc4a22f3..6aa7d74cfc 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -4,6 +4,7 @@ - Feature: [#18732] [Plugin] API to get the guests thoughts. - Feature: [#18744] Cheat to allow using a regular path as a queue path. - Improved: [#18826] [Plugin] Added all actions and their documentation to plugin API. +- Fix: [#18911] Update mini golf fencing to draw correctly from all angles. 0.4.3 (2022-12-14) ------------------------------------------------------------------------ diff --git a/src/openrct2/ride/gentle/MiniGolf.cpp b/src/openrct2/ride/gentle/MiniGolf.cpp index a986463923..526aafaba4 100644 --- a/src/openrct2/ride/gentle/MiniGolf.cpp +++ b/src/openrct2/ride/gentle/MiniGolf.cpp @@ -693,7 +693,7 @@ static void PaintMiniGolfStation( } bool hasSWFence = track_paint_util_has_fence(EDGE_SW, session.MapPosition, trackElement, ride, session.CurrentRotation); - if (hasFence) + if (hasSWFence) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SprMiniGolfFlatFenceFrontNwSe); PaintAddImageAsParent(session, imageId, { 10, 0, height }, { 1, 32, 7 }, { 31, 0, height + 2 }); @@ -715,7 +715,7 @@ static void PaintMiniGolfStation( } bool hasSEFence = track_paint_util_has_fence(EDGE_SE, session.MapPosition, trackElement, ride, session.CurrentRotation); - if (hasFence) + if (hasSEFence) { imageId = session.TrackColours[SCHEME_MISC].WithIndex(SprMiniGolfFlatFenceFrontSwNe); PaintAddImageAsParent(session, imageId, { 0, 10, height }, { 32, 1, 7 }, { 0, 31, height + 2 });