From 0aca04256ba1e3bff71b739819846a9928e84797 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Thu, 12 Sep 2019 23:11:55 +0200 Subject: [PATCH] Fix #9978: Mazes are imported incorrectly --- src/openrct2/rct2/S6Importer.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 7320169979..96ccf5165c 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1058,17 +1058,14 @@ public: dst2->SetHasGreenLight(src2->HasGreenLight()); dst2->SetPhotoTimeout(src2->GetPhotoTimeout()); // Skipping IsHighlighted() - auto ride = get_ride(dst2->GetRideIndex()); - if (ride) + auto rideType = _s6.rides[src2->GetRideIndex()].type; + if (rideType == RIDE_TYPE_MULTI_DIMENSION_ROLLER_COASTER) { - if (ride->type == RIDE_TYPE_MULTI_DIMENSION_ROLLER_COASTER) - { - dst2->SetSeatRotation(src2->GetSeatRotation()); - } - else if (ride->type == RIDE_TYPE_MAZE) - { - dst2->SetMazeEntry(src2->GetMazeEntry()); - } + dst2->SetSeatRotation(src2->GetSeatRotation()); + } + else if (rideType == RIDE_TYPE_MAZE) + { + dst2->SetMazeEntry(src2->GetMazeEntry()); } break;