mirror of https://github.com/OpenRCT2/OpenRCT2.git
Part of #13874: Replace piece lengths
This commit is contained in:
parent
716dd3dcb6
commit
780eb4f287
|
@ -4909,7 +4909,8 @@ static int32_t ride_get_track_length(Ride* ride)
|
|||
while (track_circuit_iterator_next(&it))
|
||||
{
|
||||
trackType = it.current.element->AsTrack()->GetTrackType();
|
||||
result += TrackPieceLengths[trackType];
|
||||
const auto& teDescriptor = GetTrackElementDescriptor(trackType);
|
||||
result += teDescriptor.PieceLength;
|
||||
|
||||
moveSlowIt = !moveSlowIt;
|
||||
if (moveSlowIt)
|
||||
|
|
|
@ -2816,7 +2816,7 @@ const rct_preview_track *TrackBlocks[TrackElemType::Count] = {
|
|||
TrackBlocksFlatTrack3x3,
|
||||
};
|
||||
|
||||
const uint8_t TrackPieceLengths[TrackElemType::Count] = {
|
||||
const static uint8_t TrackPieceLengths[TrackElemType::Count] = {
|
||||
32, // TrackElemType::Flat
|
||||
32, // TrackElemType::EndStation
|
||||
32, // TrackElemType::BeginStation
|
||||
|
|
|
@ -21,8 +21,6 @@ extern const uint8_t TrackSequenceProperties[TrackElemType::Count][MaxSequencesP
|
|||
|
||||
extern const rct_preview_track* TrackBlocks[TrackElemType::Count];
|
||||
|
||||
extern const uint8_t TrackPieceLengths[TrackElemType::Count];
|
||||
|
||||
struct track_curve_chain
|
||||
{
|
||||
int32_t next;
|
||||
|
|
Loading…
Reference in New Issue