1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 13:03:11 +01:00

Remove ride type check in JuniorRollerCoaster.cpp

This commit is contained in:
Gymnasiast
2022-08-06 12:16:57 +02:00
parent 5249ae1426
commit ab68d7d631
3 changed files with 6 additions and 6 deletions

View File

@@ -1865,7 +1865,7 @@ void junior_rc_paint_track_flat(
void junior_rc_paint_station(
paint_session& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, uint16_t height,
const TrackElement& trackElement, uint8_t rideType)
const TrackElement& trackElement, bool drawBlockBrake)
{
uint32_t imageId;
@@ -1878,7 +1878,7 @@ void junior_rc_paint_station(
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 1 }, { 0, 2, height });
// height += 2 (height)
if (trackElement.GetTrackType() == TrackElemType::EndStation && rideType == RIDE_TYPE_JUNIOR_ROLLER_COASTER)
if (trackElement.GetTrackType() == TrackElemType::EndStation && drawBlockBrake)
{
imageId = junior_rc_track_pieces_block_brake[isBraked][direction] | session.TrackColours[SCHEME_TRACK];
}
@@ -1900,7 +1900,7 @@ void junior_rc_paint_station(
PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 1 }, { 2, 0, height });
// height += 2 (height)
if (trackElement.GetTrackType() == TrackElemType::EndStation && rideType == RIDE_TYPE_JUNIOR_ROLLER_COASTER)
if (trackElement.GetTrackType() == TrackElemType::EndStation && drawBlockBrake)
{
imageId = junior_rc_track_pieces_block_brake[isBraked][direction] | session.TrackColours[SCHEME_TRACK];
}
@@ -5803,7 +5803,7 @@ static void paint_junior_rc_station_track(
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
const TrackElement& trackElement)
{
junior_rc_paint_station(session, ride, trackSequence, direction, height, trackElement, RIDE_TYPE_JUNIOR_ROLLER_COASTER);
junior_rc_paint_station(session, ride, trackSequence, direction, height, trackElement, true);
}
/* rct2: 0x0051881E */

View File

@@ -24,7 +24,7 @@ struct TrackElement;
void junior_rc_paint_station(
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,
const TrackElement& trackElement, uint8_t rideType);
const TrackElement& trackElement, bool drawBlockBrake);
void junior_rc_paint_track_flat(
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, uint16_t height,

View File

@@ -148,7 +148,7 @@ static void water_rc_track_station(
paint_session& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height,
const TrackElement& trackElement)
{
junior_rc_paint_station(session, ride, trackSequence, direction, height, trackElement, RIDE_TYPE_WATER_COASTER);
junior_rc_paint_station(session, ride, trackSequence, direction, height, trackElement, false);
}
static void water_rc_track_60_deg_up(