From fa5c0f0b9f8215c7d589ab4d7798d6ff03057de1 Mon Sep 17 00:00:00 2001 From: mix Date: Tue, 14 Apr 2026 14:46:12 +0100 Subject: [PATCH 1/3] Fix #26019: Invert large loop tunnel, support and train drawing glitches --- .../track/coaster/InvertedRollerCoaster.cpp | 42 +++++++------------ 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/src/openrct2/paint/track/coaster/InvertedRollerCoaster.cpp b/src/openrct2/paint/track/coaster/InvertedRollerCoaster.cpp index 9a00f7d7e4..cee0327680 100644 --- a/src/openrct2/paint/track/coaster/InvertedRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/InvertedRollerCoaster.cpp @@ -9451,7 +9451,7 @@ static void InvertedRCTrackLeftLargeHalfLoopUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27644), { 0, 0, height }, - { { 30, 16, height }, { 2, 16, 3 } }); + { { 0, 6, height + 227 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -9466,7 +9466,7 @@ static void InvertedRCTrackLeftLargeHalfLoopUp( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27665), { 0, 0, height }, - { { 30, 0, height + 140 }, { 2, 16, 3 } }); + { { 0, 6, height + 227 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9485,32 +9485,25 @@ static void InvertedRCTrackLeftLargeHalfLoopUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27645), { 0, 0, height }, - { { 0, 16, height + 32 }, { 32, 16, 0 } }); - MetalASupportsPaintSetup( - session, supportType.metal, MetalSupportPlace::centre, 27, height, session.SupportColours); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27652), { 0, 0, height }, - { { 0, 16, height }, { 32, 16, 0 } }); - MetalASupportsPaintSetup( - session, supportType.metal, MetalSupportPlace::centre, 27, height, session.SupportColours); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27659), { 0, 0, height }, - { { 0, 0, height }, { 32, 16, 0 } }); - MetalASupportsPaintSetup( - session, supportType.metal, MetalSupportPlace::centre, 25, height, session.SupportColours); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27666), { 0, 0, height }, - { { 0, 0, height + 32 }, { 32, 16, 0 } }); - MetalASupportsPaintSetup( - session, supportType.metal, MetalSupportPlace::centre, 27, height, session.SupportColours); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } + MetalASupportsPaintSetup(session, supportType.metal, MetalSupportPlace::centre, 30, height, session.SupportColours); if (direction == 0 || direction == 3) { PaintUtilPushTunnelRotated(session, direction, height + 32, kTunnelGroup, TunnelSubType::Flat); @@ -9701,7 +9694,7 @@ static void InvertedRCTrackRightLargeHalfLoopUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27693), { 0, 0, height }, - { { 30, 0, height + 140 }, { 2, 16, 3 } }); + { { 0, 6, height + 227 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -9716,7 +9709,7 @@ static void InvertedRCTrackRightLargeHalfLoopUp( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27672), { 0, 0, height }, - { { 30, 16, height + 140 }, { 2, 16, 3 } }); + { { 0, 6, height + 227 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -9735,32 +9728,25 @@ static void InvertedRCTrackRightLargeHalfLoopUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27694), { 0, 0, height }, - { { 0, 0, height + 32 }, { 32, 16, 0 } }); - MetalASupportsPaintSetup( - session, supportType.metal, MetalSupportPlace::centre, 27, height, session.SupportColours); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27687), { 0, 0, height }, - { { 0, 0, height }, { 32, 16, 0 } }); - MetalASupportsPaintSetup( - session, supportType.metal, MetalSupportPlace::centre, 25, height, session.SupportColours); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27680), { 0, 0, height }, - { { 0, 16, height }, { 32, 16, 0 } }); - MetalASupportsPaintSetup( - session, supportType.metal, MetalSupportPlace::centre, 27, height, session.SupportColours); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27673), { 0, 0, height }, - { { 0, 16, height + 32 }, { 32, 16, 0 } }); - MetalASupportsPaintSetup( - session, supportType.metal, MetalSupportPlace::centre, 27, height, session.SupportColours); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } + MetalASupportsPaintSetup(session, supportType.metal, MetalSupportPlace::centre, 30, height, session.SupportColours); if (direction == 0 || direction == 3) { PaintUtilPushTunnelRotated(session, direction, height + 32, kTunnelGroup, TunnelSubType::Flat); From e55eebe102d3738248d5180cf308770c7c4e7905 Mon Sep 17 00:00:00 2001 From: mix Date: Tue, 14 Apr 2026 15:04:06 +0100 Subject: [PATCH 2/3] Fix invert flying large loop tunnel and train drawing glitches --- .../track/coaster/FlyingRollerCoaster.cpp | 43 +++++++------------ 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/src/openrct2/paint/track/coaster/FlyingRollerCoaster.cpp b/src/openrct2/paint/track/coaster/FlyingRollerCoaster.cpp index 67ef22a063..f8857ede54 100644 --- a/src/openrct2/paint/track/coaster/FlyingRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/FlyingRollerCoaster.cpp @@ -503,7 +503,7 @@ static void FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27644), { 0, 0, height - 4 }, - { { 30, 16, height }, { 2, 16, 3 } }); + { { 0, 6, height + 211 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -518,7 +518,7 @@ static void FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27665), { 0, 0, height - 4 }, - { { 30, 0, height + 140 }, { 2, 16, 3 } }); + { { 0, 6, height + 211 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -537,32 +537,26 @@ static void FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27645), { 0, 0, height - 4 }, - { { 0, 16, height + 32 }, { 32, 24, 0 } }); - MetalASupportsPaintSetup( - session, supportType.metal, MetalSupportPlace::centre, 0, height + 24, session.SupportColours); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27652), { 0, 0, height - 4 }, - { { 0, 16, height + 32 }, { 32, 24, 0 } }); - MetalASupportsPaintSetup( - session, supportType.metal, MetalSupportPlace::centre, 0, height + 24, session.SupportColours); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27659), { 0, 0, height - 4 }, - { { 0, 0, height + 32 }, { 32, 24, 0 } }); - MetalASupportsPaintSetup( - session, supportType.metal, MetalSupportPlace::centre, 0, height + 24, session.SupportColours); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27666), { 0, 0, height - 4 }, - { { 0, 0, height + 32 }, { 32, 24, 0 } }); - MetalASupportsPaintSetup( - session, supportType.metal, MetalSupportPlace::centre, 0, height + 24, session.SupportColours); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } + + MetalASupportsPaintSetup(session, supportType.metal, MetalSupportPlace::centre, 25, height, session.SupportColours); if (direction == 0 || direction == 3) { PaintUtilPushTunnelRotated(session, direction, height + 32, kTunnelGroup, TunnelSubType::Flat); @@ -752,7 +746,7 @@ static void FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27693), { 0, 0, height - 4 }, - { { 30, 7, height + 140 }, { 2, 16, 3 } }); + { { 0, 6, height + 211 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -767,7 +761,7 @@ static void FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27672), { 0, 0, height - 4 }, - { { 30, 16, height + 140 }, { 2, 16, 3 } }); + { { 0, 6, height + 211 }, { 32, 20, 3 } }); break; } PaintUtilSetSegmentSupportHeight( @@ -786,32 +780,25 @@ static void FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27694), { 0, 0, height - 4 }, - { { 0, 0, height + 32 }, { 32, 24, 0 } }); - MetalASupportsPaintSetup( - session, supportType.metal, MetalSupportPlace::centre, 0, height + 24, session.SupportColours); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27687), { 0, 0, height - 4 }, - { { 0, 0, height + 32 }, { 32, 24, 0 } }); - MetalASupportsPaintSetup( - session, supportType.metal, MetalSupportPlace::centre, 0, height + 24, session.SupportColours); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27680), { 0, 0, height - 4 }, - { { 0, 16, height + 32 }, { 32, 24, 0 } }); - MetalASupportsPaintSetup( - session, supportType.metal, MetalSupportPlace::centre, 0, height + 24, session.SupportColours); + { { 0, 6, height }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(27673), { 0, 0, height - 4 }, - { { 0, 16, height + 32 }, { 32, 24, 0 } }); - MetalASupportsPaintSetup( - session, supportType.metal, MetalSupportPlace::centre, 0, height + 24, session.SupportColours); + { { 0, 6, height + 32 }, { 32, 20, 3 } }); break; } + MetalASupportsPaintSetup(session, supportType.metal, MetalSupportPlace::centre, 25, height, session.SupportColours); if (direction == 0 || direction == 3) { PaintUtilPushTunnelRotated(session, direction, height + 32, kTunnelGroup, TunnelSubType::Flat); From 7b80501b39d6b341c5abdad0c686535f19f65c50 Mon Sep 17 00:00:00 2001 From: mix Date: Tue, 14 Apr 2026 15:08:42 +0100 Subject: [PATCH 3/3] Add changelog entry for inverted large half loop fixes --- distribution/changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index e2b91a38dc..4d6ff4baca 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -2,6 +2,7 @@ ------------------------------------------------------------------------ - Feature: [#24242] [Plugin] Add ride-breakdown hooktype. - Feature: [#24879] [Plugin] Add methods for showing and hiding gridlines. +- Fix: [#26019] Inverted and Inverted Flying Roller Coaster large half loops glitch with the train and don't draw in tunnels at some angles (original bug). - Fix: [#26183] The ride stat graph placeholder text is not drawn in the expected position. - Fix: [#26299] Single Rail S-Bend sprites don't fully connect to the next track piece at certain angles. - Fix: [#26352] Large scenery items are incorrectly labelled as 'banners' in the tile inspector.