From 860127e898e37c5b002a65bd52ea15a0ed41d2ea Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Mon, 12 Feb 2018 20:48:22 +0100 Subject: [PATCH] Fix rides selling balloons --- src/openrct2/object/RideObject.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openrct2/object/RideObject.cpp b/src/openrct2/object/RideObject.cpp index 801f679aea..ef5d2059d2 100644 --- a/src/openrct2/object/RideObject.cpp +++ b/src/openrct2/object/RideObject.cpp @@ -555,6 +555,10 @@ void RideObject::ReadJson(IReadObjectContext * context, const json_t * root) _legacyType.max_height = ObjectJsonHelpers::GetInteger(properties, "maxHeight"); + // This needs to be set for both shops/facilities _and_ regular rides. + _legacyType.shop_item = SHOP_ITEM_NONE; + _legacyType.shop_item_secondary = SHOP_ITEM_NONE; + if (IsRideTypeShopOrFacility(_legacyType.ride_type[0])) { // Standard car info for a shop @@ -572,8 +576,6 @@ void RideObject::ReadJson(IReadObjectContext * context, const json_t * root) // Shop item auto rideSells = ObjectJsonHelpers::GetJsonStringArray(json_object_get(json_object_get(root, "properties"), "sells")); - _legacyType.shop_item = SHOP_ITEM_NONE; - _legacyType.shop_item_secondary = SHOP_ITEM_NONE; if (rideSells.size() >= 1) { _legacyType.shop_item = ParseShopItem(rideSells[0]);