1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Improve track type support check

This commit is contained in:
Marijn van der Werf
2016-09-16 14:30:20 +02:00
parent f2f99d7bb1
commit 987bfa409a

View File

@@ -465,16 +465,23 @@ int getTrackSequenceCount(uint8 rideType, uint8 trackType) {
return sequenceCount;
}
bool rideSupportsTrackType(int rideType, int trackType) {
bool rideSupportsTrackType(int rideType, int trackType)
{
TRACK_PAINT_FUNCTION_GETTER newPaintGetter = RideTypeTrackPaintFunctions[rideType];
if (newPaintGetter == NULL) {
return false;
}
bool supportsTrackType = (newPaintGetter(trackType, 0) != NULL);
if (newPaintGetter(trackType, 0) == NULL) {
return false;
}
return supportsTrackType;
if (RideTypeTrackPaintFunctionsOld[rideType][trackType] == 0) {
return false;
}
return true;
}