mirror of https://github.com/OpenRCT2/OpenRCT2.git
Create TrackTypeIsHelix()
This commit is contained in:
parent
fc08cf98ed
commit
53fcad8d76
|
@ -658,6 +658,17 @@ bool TrackTypeHasSpeedSetting(track_type_t trackType)
|
||||||
return trackType == TrackElemType::Brakes || trackType == TrackElemType::Booster;
|
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)
|
std::optional<CoordsXYZD> GetTrackSegmentOrigin(const CoordsXYE& posEl)
|
||||||
{
|
{
|
||||||
auto trackEl = posEl.element->AsTrack();
|
auto trackEl = posEl.element->AsTrack();
|
||||||
|
|
|
@ -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);
|
ResultWithMessage track_remove_station_element(const CoordsXYZD& loc, RideId rideIndex, int32_t flags);
|
||||||
|
|
||||||
bool TrackTypeHasSpeedSetting(track_type_t trackType);
|
bool TrackTypeHasSpeedSetting(track_type_t trackType);
|
||||||
|
bool TrackTypeIsHelix(track_type_t trackType);
|
||||||
std::optional<CoordsXYZD> GetTrackSegmentOrigin(const CoordsXYE& posEl);
|
std::optional<CoordsXYZD> GetTrackSegmentOrigin(const CoordsXYE& posEl);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue