Create TrackTypeIsHelix()

This commit is contained in:
Gymnasiast 2023-01-03 00:10:07 +01:00
parent fc08cf98ed
commit 53fcad8d76
No known key found for this signature in database
GPG Key ID: DBFFF47AB2CA3EDD
2 changed files with 12 additions and 0 deletions

View File

@ -658,6 +658,17 @@ bool TrackTypeHasSpeedSetting(track_type_t trackType)
return trackType == TrackElemType::Brakes || trackType == TrackElemType::Booster;
}
bool TrackTypeIsHelix(track_type_t trackType)
{
if (trackType >= TrackElemType::LeftHalfBankedHelixUpSmall && trackType <= TrackElemType::RightHalfBankedHelixDownLarge)
return true;
if (trackType >= TrackElemType::LeftQuarterBankedHelixLargeUp && trackType <= TrackElemType::RightQuarterHelixLargeDown)
return true;
return false;
}
std::optional<CoordsXYZD> GetTrackSegmentOrigin(const CoordsXYE& posEl)
{
auto trackEl = posEl.element->AsTrack();

View File

@ -633,6 +633,7 @@ ResultWithMessage track_add_station_element(CoordsXYZD loc, RideId rideIndex, in
ResultWithMessage track_remove_station_element(const CoordsXYZD& loc, RideId rideIndex, int32_t flags);
bool TrackTypeHasSpeedSetting(track_type_t trackType);
bool TrackTypeIsHelix(track_type_t trackType);
std::optional<CoordsXYZD> GetTrackSegmentOrigin(const CoordsXYE& posEl);
/**