mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 20:43:04 +01:00
Part of #13874: Replace piece lengths
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user