From db3c2fcc463b7d626bfd720f9553fd59fe405724 Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Fri, 5 Oct 2018 13:56:31 +0200 Subject: [PATCH] Use calls to set queue from track designs --- src/openrct2/world/Footpath.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index 95927196ac..20c1d859a0 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -406,8 +406,10 @@ static money32 footpath_element_update( footpath_remove_edges_at(x, y, tileElement); tileElement->AsPath()->SetEntryIndex(type); - - tileElement->type = (tileElement->type & 0xFE) | (type >> 7); + if (type & (1 << 7)) + tileElement->AsPath()->SetIsQueue(true); + else + tileElement->AsPath()->SetIsQueue(false); tileElement->AsPath()->SetAddition(pathItemType); tileElement->flags &= ~TILE_ELEMENT_FLAG_BROKEN; @@ -663,8 +665,8 @@ static money32 footpath_place_from_track( pathElement->SetSlopeDirection(slope & FOOTPATH_PROPERTIES_SLOPE_DIRECTION_MASK); if (slope & FOOTPATH_PROPERTIES_FLAG_IS_SLOPED) pathElement->SetSloped(true); - - tileElement->type |= type >> 7; + if (type & (1 << 7)) + tileElement->AsPath()->SetIsQueue(true); pathElement->SetAddition(0); tileElement->AsPath()->SetRideIndex(RIDE_ID_NULL); tileElement->AsPath()->SetAdditionStatus(255);