Skip to content

Commit

Permalink
Fix OpenRCT2#22008: Lay-down roller coaster uses the wrong supports
Browse files Browse the repository at this point in the history
  • Loading branch information
Gymnasiast committed May 11, 2024
1 parent 57a6b0a commit 961d130
Show file tree
Hide file tree
Showing 8 changed files with 624 additions and 648 deletions.
1 change: 1 addition & 0 deletions distribution/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Change: [#7248] Small mini-maps are now centred in the map window.
- Fix: [#13294] Map corners are cut off in some directions (original bug).
- Fix: [#21974] No reason specified when attempting to place benches, lamps, or bins on path with no unconnected edges (original bug).
- Fix: [#22008] Uninverted Lay-down roller coaster uses the wrong support type.
- Fix: [#22012] [Plugin] Images on ImgButton widgets cannot be updated.

0.4.11 (2024-05-05)
Expand Down
2 changes: 1 addition & 1 deletion src/openrct2/libopenrct2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@
<ClInclude Include="ReplayManager.h" />
<ClInclude Include="ride\CableLift.h" />
<ClInclude Include="ride\coaster\BolligerMabillardTrack.hpp" />
<ClInclude Include="ride\coaster\CorkscrewRollerCoaster.hpp" />
<ClInclude Include="ride\coaster\meta\AirPoweredVerticalCoaster.h" />
<ClInclude Include="ride\coaster\meta\AlpineCoaster.h" />
<ClInclude Include="ride\coaster\meta\BobsleighCoaster.h" />
Expand Down Expand Up @@ -917,7 +918,6 @@
<ClCompile Include="ride\coaster\ClassicStandUpRollerCoaster.cpp" />
<ClCompile Include="ride\coaster\ClassicWoodenRollerCoaster.cpp" />
<ClCompile Include="ride\coaster\CompactInvertedCoaster.cpp" />
<ClCompile Include="ride\coaster\CorkscrewRollerCoaster.cpp" />
<ClCompile Include="ride\coaster\FlyingRollerCoaster.cpp" />
<ClCompile Include="ride\coaster\GigaCoaster.cpp" />
<ClCompile Include="ride\coaster\HeartlineTwisterCoaster.cpp" />
Expand Down
1 change: 0 additions & 1 deletion src/openrct2/ride/TrackPaint.h
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,6 @@ TRACK_PAINT_FUNCTION GetTrackPaintFunctionDinghySlide(int32_t trackType);
TRACK_PAINT_FUNCTION GetTrackPaintFunctionDinghySlideCovered(int32_t trackType);
TRACK_PAINT_FUNCTION GetTrackPaintFunctionMineTrainRC(int32_t trackType);
TRACK_PAINT_FUNCTION GetTrackPaintFunctionChairlift(int32_t trackType);
TRACK_PAINT_FUNCTION GetTrackPaintFunctionCorkscrewRC(int32_t trackType);
TRACK_PAINT_FUNCTION GetTrackPaintFunctionMaze(int32_t trackType);
TRACK_PAINT_FUNCTION GetTrackPaintFunctionSpiralSlide(int32_t trackType);
TRACK_PAINT_FUNCTION GetTrackPaintFunctionGoKarts(int32_t trackType);
Expand Down

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/openrct2/ride/coaster/LayDownRollerCoasterInverted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include "../RideData.h"
#include "../TrackData.h"
#include "../TrackPaint.h"
#include "CorkscrewRollerCoaster.hpp"

static constexpr ImageIndex kLaydownDiagFlatImages[2][NumOrthogonalDirections] = {
{ 26781, 26782, 26783, 26784 },
{ 26809, 26810, 26811, 26812 },
Expand Down Expand Up @@ -7468,7 +7470,7 @@ static void LayDownRCTrackRightFlyerCorkscrewDown(
PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
const TrackElement& trackElement)
{
auto function = GetTrackPaintFunctionCorkscrewRC(TrackElemType::LeftFlyerCorkscrewUp);
auto function = GetTrackPaintFunctionCorkscrewRC<MetalSupportType::TubesInverted>(TrackElemType::LeftFlyerCorkscrewUp);
function(session, ride, 2 - trackSequence, (direction + 3) % 4, height, trackElement);
return;
}
Expand Down
3 changes: 2 additions & 1 deletion src/openrct2/ride/coaster/meta/CorkscrewRollerCoaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
#include "../../RideData.h"
#include "../../ShopItem.h"
#include "../../Track.h"
#include "../CorkscrewRollerCoaster.hpp"

// clang-format off
constexpr RideTypeDescriptor CorkscrewRollerCoasterRTD =
{
.Category = RIDE_CATEGORY_ROLLERCOASTER,
.StartTrackPiece = TrackElemType::EndStation,
.TrackPaintFunctions = TrackDrawerDescriptor({
.Drawer = GetTrackPaintFunctionCorkscrewRC,
.Drawer = GetTrackPaintFunctionCorkscrewRC<MetalSupportType::Tubes>,
.EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES,TRACK_BOOSTER, TRACK_SLOPE_STEEP_LONG, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES},
.ExtraTrackPieces = {TRACK_TWIST},
}),
Expand Down
3 changes: 2 additions & 1 deletion src/openrct2/ride/coaster/meta/Hypercoaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
#include "../../RideData.h"
#include "../../ShopItem.h"
#include "../../Track.h"
#include "../CorkscrewRollerCoaster.hpp"

// clang-format off
constexpr RideTypeDescriptor HypercoasterRTD =
{
.Category = RIDE_CATEGORY_ROLLERCOASTER,
.StartTrackPiece = TrackElemType::EndStation,
.TrackPaintFunctions = TrackDrawerDescriptor({
.Drawer = GetTrackPaintFunctionCorkscrewRC,
.Drawer = GetTrackPaintFunctionCorkscrewRC<MetalSupportType::Tubes>,
.EnabledTrackPieces = {TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_SLOPE_STEEP_LONG, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES},
.ExtraTrackPieces = {TRACK_VERTICAL_LOOP, TRACK_HALF_LOOP, TRACK_CORKSCREW, TRACK_BOOSTER},
}),
Expand Down
3 changes: 2 additions & 1 deletion src/openrct2/ride/coaster/meta/LayDownRollerCoaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "../../RideData.h"
#include "../../ShopItem.h"
#include "../../Track.h"
#include "../CorkscrewRollerCoaster.hpp"

// clang-format off
constexpr RideTypeDescriptor LayDownRollerCoasterRTD =
Expand All @@ -21,7 +22,7 @@ constexpr RideTypeDescriptor LayDownRollerCoasterRTD =
.StartTrackPiece = TrackElemType::EndStation,
.TrackPaintFunctions = TrackDrawerDescriptor(
{
.Drawer = GetTrackPaintFunctionCorkscrewRC,
.Drawer = GetTrackPaintFunctionCorkscrewRC<MetalSupportType::TubesInverted>,
.EnabledTrackPieces = { TRACK_STRAIGHT, TRACK_STATION_END, TRACK_LIFT_HILL, TRACK_FLAT_ROLL_BANKING, TRACK_VERTICAL_LOOP, TRACK_SLOPE, TRACK_SLOPE_STEEP_UP, TRACK_SLOPE_STEEP_DOWN, TRACK_SLOPE_CURVE, TRACK_SLOPE_CURVE_STEEP, TRACK_S_BEND, TRACK_CURVE_SMALL, TRACK_CURVE, TRACK_CURVE_LARGE, TRACK_HELIX_DOWN_BANKED_HALF, TRACK_HELIX_UP_BANKED_HALF, TRACK_BRAKES, TRACK_ON_RIDE_PHOTO, TRACK_BLOCK_BRAKES, TRACK_INLINE_TWIST_UNINVERTED, TRACK_FLYING_HALF_LOOP_UNINVERTED_UP, TRACK_CORKSCREW_UNINVERTED, TRACK_SLOPE_STEEP_LONG, TRACK_DIAG_BRAKES, TRACK_DIAG_BLOCK_BRAKES },
.ExtraTrackPieces = { TRACK_FLYING_HALF_LOOP_UNINVERTED_DOWN, TRACK_BOOSTER },
}
Expand Down

0 comments on commit 961d130

Please sign in to comment.