mirror of https://github.com/OpenRCT2/OpenRCT2.git
RCT1 import: fix for Junior Roller Coaster
This commit is contained in:
parent
e319df533e
commit
3e9d56a284
|
@ -1601,9 +1601,29 @@ void viewport_track_paint_setup(uint8 direction, int height, rct_map_element *ma
|
|||
RCT2_GLOBAL(0x00F441A4, uint32) = ghost_id;
|
||||
}
|
||||
|
||||
TRACK_PAINT_FUNCTION **trackTypeList = (TRACK_PAINT_FUNCTION**)RideTypeTrackPaintFunctionsOld[ride->type];
|
||||
int rideType = ride->type;
|
||||
if (rideType == RIDE_TYPE_JUNIOR_ROLLER_COASTER) {
|
||||
switch (trackType) {
|
||||
case TRACK_ELEM_60_DEG_UP:
|
||||
case TRACK_ELEM_25_DEG_UP_TO_60_DEG_UP:
|
||||
case TRACK_ELEM_60_DEG_UP_TO_25_DEG_UP:
|
||||
case TRACK_ELEM_60_DEG_DOWN:
|
||||
case TRACK_ELEM_25_DEG_DOWN_TO_60_DEG_DOWN:
|
||||
case TRACK_ELEM_60_DEG_DOWN_TO_25_DEG_DOWN:
|
||||
rideType = RIDE_TYPE_WATER_COASTER;
|
||||
break;
|
||||
|
||||
case TRACK_ELEM_FLAT_TO_60_DEG_UP:
|
||||
case TRACK_ELEM_60_DEG_UP_TO_FLAT:
|
||||
case TRACK_ELEM_FLAT_TO_60_DEG_DOWN:
|
||||
case TRACK_ELEM_60_DEG_DOWN_TO_FLAT:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
TRACK_PAINT_FUNCTION **trackTypeList = (TRACK_PAINT_FUNCTION**)RideTypeTrackPaintFunctionsOld[rideType];
|
||||
if (trackTypeList == NULL) {
|
||||
TRACK_PAINT_FUNCTION_GETTER paintFunctionGetter = RideTypeTrackPaintFunctions[ride->type];
|
||||
TRACK_PAINT_FUNCTION_GETTER paintFunctionGetter = RideTypeTrackPaintFunctions[rideType];
|
||||
TRACK_PAINT_FUNCTION paintFunction = paintFunctionGetter(trackType, direction);
|
||||
if (paintFunction != NULL) {
|
||||
paintFunction(rideIndex, trackSequence, direction, height, mapElement);
|
||||
|
@ -1615,7 +1635,7 @@ void viewport_track_paint_setup(uint8 direction, int height, rct_map_element *ma
|
|||
// Have to call from this point as it pushes esi and expects callee to pop it
|
||||
RCT2_CALLPROC_X(
|
||||
0x006C4934,
|
||||
ride->type,
|
||||
rideType,
|
||||
(int)trackDirectionList,
|
||||
direction,
|
||||
height,
|
||||
|
|
Loading…
Reference in New Issue