mirror of https://github.com/OpenRCT2/OpenRCT2.git
Issue was caused by a bit of code not iterating correctly backwards.
This commit is contained in:
parent
47ca2c4c59
commit
6a00482d1f
|
@ -368,7 +368,7 @@
|
|||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<StructMemberAlignment>1Byte</StructMemberAlignment>
|
||||
<PreprocessorDefinitions>DEBUG;DEBUG_DESYNC;_CRT_SECURE_NO_WARNINGS;HAVE_CONFIG_H;_USE_MATH_DEFINES;CURL_STATICLIB;SDL_MAIN_HANDLED;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>DEBUG;_CRT_SECURE_NO_WARNINGS;HAVE_CONFIG_H;_USE_MATH_DEFINES;CURL_STATICLIB;SDL_MAIN_HANDLED;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<ObjectFileName>$(IntDir)fake\%(RelativeDir)</ObjectFileName>
|
||||
|
|
|
@ -2654,14 +2654,22 @@ int tracked_ride_to_td6(uint8 rideIndex, rct_track_td6* track_design, uint8* tra
|
|||
}
|
||||
|
||||
int z = 0;
|
||||
//6ce69e
|
||||
// Find the start of the track.
|
||||
// It has to do this as a backwards loop incase this is an incomplete track.
|
||||
if (track_block_get_previous(trackElement.x, trackElement.y, trackElement.element, &trackBeginEnd)) {
|
||||
rct_map_element* initial_map = trackElement.element;
|
||||
do {
|
||||
rct_xy_element lastGood = {
|
||||
.element = trackBeginEnd.begin_element,
|
||||
.x = trackBeginEnd.begin_x,
|
||||
.y = trackBeginEnd.begin_y
|
||||
};
|
||||
|
||||
if (!track_block_get_previous(trackBeginEnd.begin_x, trackBeginEnd.begin_y, trackBeginEnd.begin_element, &trackBeginEnd)) {
|
||||
trackElement = lastGood;
|
||||
break;
|
||||
}
|
||||
} while (initial_map != trackElement.element);
|
||||
} while (initial_map != trackBeginEnd.begin_element);
|
||||
}
|
||||
|
||||
z = trackElement.element->base_height * 8;
|
||||
|
|
Loading…
Reference in New Issue