mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-02-03 18:07:53 +01:00
Reduce direct ride type checking; move available piece lookup to RTD (#11353)
This commit is contained in:
committed by
GitHub
parent
d17b4606f3
commit
8127437de1
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "RideData.h"
|
||||
|
||||
#include "../Cheats.h"
|
||||
#include "../audio/audio.h"
|
||||
#include "../interface/Colour.h"
|
||||
#include "../localisation/Localisation.h"
|
||||
@@ -2505,3 +2506,17 @@ bool RideTypeDescriptor::HasFlag(uint64_t flag) const
|
||||
{
|
||||
return Flags & flag;
|
||||
}
|
||||
|
||||
uint64_t RideTypeDescriptor::GetAvailableTrackPieces() const
|
||||
{
|
||||
if (gCheatsEnableAllDrawableTrackPieces)
|
||||
{
|
||||
return EnabledTrackPieces | ExtraTrackPieces;
|
||||
}
|
||||
return EnabledTrackPieces;
|
||||
}
|
||||
|
||||
bool RideTypeDescriptor::SupportsTrackPiece(const uint64_t trackPiece) const
|
||||
{
|
||||
return GetAvailableTrackPieces() & (1ULL << trackPiece);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user