From 51ad88c25d8f80925f8df6c489e1935c480a47e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Sun, 29 Aug 2021 23:43:59 +0300 Subject: [PATCH] Fix #15306: Fix track paint using the wrong bounding box offsets --- src/openrct2/ride/TrackPaint.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index 99daa1465a..ce0df6247d 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -1042,7 +1042,9 @@ void track_paint_util_right_helix_up_small_quarter_tiles_paint( CoordsXY boundsLength = boundsLengths[direction][index][1]; CoordsXYZ boundsOffset = (boundsOffsets == nullptr ? CoordsXYZ(offset, 0) : boundsOffsets[direction][index][1]); - PaintAddImageAsParent(session, imageId, { offset, height }, { boundsLength, thickness[1] }, boundsOffset); + PaintAddImageAsParent( + session, imageId, { offset, height }, { boundsLength, thickness[1] }, + { boundsOffset.x, boundsOffset.y, height + boundsOffset.z }); } } @@ -1479,7 +1481,7 @@ void track_paint_util_right_quarter_turn_5_tiles_paint_2( const sprite_bb* spriteBB = &sprites[direction][sprite]; const uint32_t imageId = spriteBB->sprite_id | colourFlags; const auto& offset = spriteBB->offset; - const auto& bbOffset = spriteBB->offset; + const auto& bbOffset = spriteBB->bb_offset; PaintAddImageAsParent( session, imageId, { offset.x, offset.y, height + offset.z }, spriteBB->bb_size, { bbOffset.x, bbOffset.y, height + bbOffset.z });