Merge pull request #12676 from mwnciau/Ride-Helix-Save

Fix #7037: saving rides starting with sloped turn
This commit is contained in:
Michael Steenbeek 2020-08-26 12:13:59 +02:00 committed by GitHub
commit 8b19d943a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,6 @@
0.3.0+ (in development)
------------------------------------------------------------------------
- Fix: [#7037] Unable to save tracks starting with a sloped turn or helix.
- Fix: [#12691] Ride graph tooltip incorrectly used count instead of number string.
- Fix: [#12694] Crash when switching ride types with construction window open.
- Fix: [#12701] Silent NSIS setup flag /S isn't silent, upgrade pop-up appears anyway.

View File

@ -5366,9 +5366,12 @@ void ride_get_start_of_track(CoordsXYE* output)
bool moveSlowIt = true;
do
{
// Because we are working backwards, begin_element is the section at the end of a piece of track, whereas
// begin_x and begin_y are the coordinates at the start of a piece of track, so we need to pass end_x and
// end_y
CoordsXYE lastGood = {
/* .x = */ trackBeginEnd.begin_x,
/* .y = */ trackBeginEnd.begin_y,
/* .x = */ trackBeginEnd.end_x,
/* .y = */ trackBeginEnd.end_y,
/* .element = */ trackBeginEnd.begin_element,
};