Skip to content

Commit

Permalink
Fix OpenRCT2#10028: Saved park--brakes all set to 0mph
Browse files Browse the repository at this point in the history
  • Loading branch information
Gymnasiast authored and Evan Haataja committed Apr 27, 2020
1 parent 87565ba commit 58ac17d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
12 changes: 10 additions & 2 deletions src/openrct2/rct1/S4Importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2128,8 +2128,16 @@ class S4Importer final : public IParkImporter
dst2->SetDoorBState(src2->GetDoorBState());
dst2->SetStationIndex(src2->GetStationIndex());
dst2->SetHasGreenLight(src2->HasGreenLight());
dst2->SetBrakeBoosterSpeed(src2->GetBrakeBoosterSpeed());
dst2->SetPhotoTimeout(src2->GetPhotoTimeout());

auto trackType = dst2->GetTrackType();
if (track_element_has_speed_setting(trackType))
{
dst2->SetBrakeBoosterSpeed(src2->GetBrakeBoosterSpeed());
}
else if (trackType == TRACK_ELEM_ON_RIDE_PHOTO)
{
dst2->SetPhotoTimeout(src2->GetPhotoTimeout());
}

if (_s4.rides[src2->GetRideIndex()].type == RIDE_TYPE_MAZE)
{
Expand Down
12 changes: 10 additions & 2 deletions src/openrct2/rct2/S6Importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1056,8 +1056,16 @@ class S6Importer final : public IParkImporter
dst2->SetInverted(src2->IsInverted());
dst2->SetStationIndex(src2->GetStationIndex());
dst2->SetHasGreenLight(src2->HasGreenLight());
dst2->SetBrakeBoosterSpeed(src2->GetBrakeBoosterSpeed());
dst2->SetPhotoTimeout(src2->GetPhotoTimeout());

auto trackType = dst2->GetTrackType();
if (track_element_has_speed_setting(trackType))
{
dst2->SetBrakeBoosterSpeed(src2->GetBrakeBoosterSpeed());
}
else if (trackType == TRACK_ELEM_ON_RIDE_PHOTO)
{
dst2->SetPhotoTimeout(src2->GetPhotoTimeout());
}

// Skipping IsHighlighted()
auto rideType = _s6.rides[src2->GetRideIndex()].type;
Expand Down

0 comments on commit 58ac17d

Please sign in to comment.