mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-24 03:12:03 -05:00
Improve track type support check
This commit is contained in:
parent
f2f99d7bb1
commit
987bfa409a
1 changed files with 10 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue