1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 07:14:31 +01:00

Merge pull request #15414 from frutiemax/develop

#15367: Encode RideType in TrackElement
This commit is contained in:
Michael Steenbeek
2021-09-25 12:02:08 +02:00
committed by GitHub
11 changed files with 41 additions and 18 deletions

View File

@@ -2277,7 +2277,9 @@ void PaintTrack(paint_session* session, Direction direction, int32_t height, con
{
return;
}
TRACK_PAINT_FUNCTION_GETTER paintFunctionGetter = ride->GetRideTypeDescriptor().TrackPaintFunction;
const auto& rtd = GetRideTypeDescriptor(trackElement.GetRideType());
TRACK_PAINT_FUNCTION_GETTER paintFunctionGetter = rtd.TrackPaintFunction;
if (paintFunctionGetter != nullptr)
{
TRACK_PAINT_FUNCTION paintFunction = paintFunctionGetter(trackType);