1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Base shop/facility bounding box on actual height

This commit is contained in:
Gymnasiast
2023-02-14 01:05:13 +01:00
parent 23a5044509
commit e585f1a633
2 changed files with 3 additions and 2 deletions

View File

@@ -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);

View File

@@ -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;