From e585f1a633f3648bcdc4ef048f241bf0c22bf4f9 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Tue, 14 Feb 2023 01:05:13 +0100 Subject: [PATCH] Base shop/facility bounding box on actual height --- src/openrct2/ride/shops/Facility.cpp | 3 ++- src/openrct2/ride/shops/Shop.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/openrct2/ride/shops/Facility.cpp b/src/openrct2/ride/shops/Facility.cpp index 8494b86dec..e7ac8ef285 100644 --- a/src/openrct2/ride/shops/Facility.cpp +++ b/src/openrct2/ride/shops/Facility.cpp @@ -35,7 +35,8 @@ static void PaintFacility( auto lengthX = (direction & 1) == 0 ? 28 : 2; auto lengthY = (direction & 1) == 0 ? 2 : 28; CoordsXYZ offset(0, 0, height); - BoundBoxXYZ bb = { { direction == 3 ? 28 : 2, direction == 0 ? 28 : 2, height }, { lengthX, lengthY, 29 } }; + BoundBoxXYZ bb = { { direction == 3 ? 28 : 2, direction == 0 ? 28 : 2, height }, + { lengthX, lengthY, trackElement.GetClearanceZ() - trackElement.GetBaseZ() - 3 } }; auto imageTemplate = session.TrackColours[SCHEME_TRACK]; auto imageIndex = firstCarEntry->base_image_id + ((direction + 2) & 3); diff --git a/src/openrct2/ride/shops/Shop.cpp b/src/openrct2/ride/shops/Shop.cpp index a13e0260ef..1d5d9b44bf 100644 --- a/src/openrct2/ride/shops/Shop.cpp +++ b/src/openrct2/ride/shops/Shop.cpp @@ -33,7 +33,7 @@ static void PaintShop( return; CoordsXYZ offset(0, 0, height); - BoundBoxXYZ bb = { { 2, 2, height }, { 28, 28, 45 } }; + BoundBoxXYZ bb = { { 2, 2, height }, { 28, 28, trackElement.GetClearanceZ() - trackElement.GetBaseZ() - 3 } }; auto imageFlags = session.TrackColours[SCHEME_TRACK].WithoutSecondary(); auto imageIndex = firstCarEntry->base_image_id + direction;