Fix #15306: Fix track paint using the wrong bounding box offsets

This commit is contained in:
ζeh Matt 2021-08-29 23:43:59 +03:00
parent a75e07cde6
commit 51ad88c25d
No known key found for this signature in database
GPG Key ID: 18CE582C71A225B0
1 changed files with 4 additions and 2 deletions

View File

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