From a63395eb1c12678a94cfcb0923f3f49c67a6247f Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Sun, 29 Sep 2019 22:53:41 +0200 Subject: [PATCH] Fix #10028: Saved park--brakes all set to 0mph --- src/openrct2/rct1/S4Importer.cpp | 12 ++++++++++-- src/openrct2/rct2/S6Importer.cpp | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 33ed51fe10..b7709065a4 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -2128,8 +2128,16 @@ private: 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) { diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 9454350673..894eb069d8 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1056,8 +1056,16 @@ public: 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;