Fix #6725: Z-fighting when car passes through scenery door

This commit is contained in:
Duncan 2024-04-13 20:32:55 +01:00 committed by GitHub
parent 0d12eb657d
commit 3ce917e2e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View File

@ -24,6 +24,7 @@
- Change: [#21529] Classify “Southern Sands”, “Tiny Towers”, “Nevermore Park”, “Pacifica” as expert scenarios.
- Change: [#21545] Reorder Wacky Worlds scenarios and adjust their difficulty classification.
- Fix: [#910] Extra viewport does not preserve the location when rotating.
- Fix: [#6725] Z fighting issue with cars using animated doors.
- Fix: [#18413] Crash when mouse over a hacked train.
- Fix: [#20338] Cannot select Scenery Picker or Scatter Tool when the scenery recolouring tool is active.
- Fix: [#21317] Track designer allows proceeding without an object selected.

View File

@ -58,7 +58,7 @@ static void PaintWallDoor(
auto newImageId0 = imageId;
auto newImageId1 = imageId.WithIndexOffset(1);
if (wallEntry.flags & WALL_SCENERY_IS_DOUBLE_SIDED)
if (wallEntry.flags & WALL_SCENERY_CANT_BUILD_ON_SLOPE)
{
PaintAddImageAsParent(session, newImageId0, offset, bbR1);
PaintAddImageAsParent(session, newImageId1, offset, bbR2);
@ -89,7 +89,7 @@ static void PaintWallDoor(
case 0:
{
BoundBoxXYZ bbR1 = { { 1, 1, height + 1 }, { 1, 3, bbHeight - 5 } };
BoundBoxXYZ bbR2 = { { 1, 1, height + bbHeight - 9 }, { 1, 28, 3 } };
BoundBoxXYZ bbR2 = { { 1, 1, height + bbHeight - 4 }, { 1, 28, 3 } };
BoundBoxXYZ bbL = { { 1, 1, height + 1 }, { 1, 28, bbHeight } };
@ -101,7 +101,7 @@ static void PaintWallDoor(
case 1:
{
BoundBoxXYZ bbR1 = { { 1, 30, height + 1 }, { 3, 3, bbHeight - 5 } };
BoundBoxXYZ bbR2 = { { 1, 30, height + bbHeight - 8 }, { 29, 3, 2 } };
BoundBoxXYZ bbR2 = { { 1, 30, height + bbHeight - 3 }, { 29, 3, 2 } };
BoundBoxXYZ bbL = { { 2, 30, height + 1 }, { 29, 1, bbHeight } };
CoordsXYZ offset = { 1, 31, height };
@ -112,7 +112,7 @@ static void PaintWallDoor(
case 2:
{
BoundBoxXYZ bbR1 = { { 30, 1, height + 1 }, { 3, 3, bbHeight - 5 } };
BoundBoxXYZ bbR2 = { { 30, 1, height + bbHeight - 8 }, { 3, 29, 2 } };
BoundBoxXYZ bbR2 = { { 30, 1, height + bbHeight - 3 }, { 3, 29, 2 } };
BoundBoxXYZ bbL = { { 30, 2, height + 1 }, { 1, 29, bbHeight } };
CoordsXYZ offset = { 31, 0, height };
@ -123,7 +123,7 @@ static void PaintWallDoor(
case 3:
{
BoundBoxXYZ bbR1 = { { 1, 1, height + 1 }, { 3, 1, bbHeight - 5 } };
BoundBoxXYZ bbR2 = { { 1, 1, height + bbHeight - 9 }, { 28, 1, 3 } };
BoundBoxXYZ bbR2 = { { 1, 1, height + bbHeight - 4 }, { 28, 1, 3 } };
BoundBoxXYZ bbL = { { 1, 1, height + 1 }, { 28, 1, bbHeight } };
CoordsXYZ offset = { 2, 1, height };