Part of #13874: Replace piece lengths

This commit is contained in:
frutiemax committed 2021-08-22 17:53:38 -04:00
1 parent 716dd3dcb6
commit 780eb4f287
3 files changed
+3 -4

No files matched your search

+2 -1
View File
@@ -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)
+1 -1
View File
@@ -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
-2
View File
@@ -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;