1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 13:33:02 +01:00

Apply review suggestion

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
This commit is contained in:
ζeh Matt
2021-09-13 13:21:18 -07:00
parent 1dde081468
commit 687b6c000e

View File

@@ -2868,8 +2868,8 @@ static void ride_set_boat_hire_return_point(Ride* ride, CoordsXYE* startElement)
trackType = trackBeginEnd.begin_element->AsTrack()->GetTrackType();
auto newCoords = GetTrackElementOriginAndApplyChanges(
{ trackCoords, static_cast<Direction>(direction) }, trackType, 0, &returnPos.element, 0);
returnPos = !newCoords.has_value() ? CoordsXYE{ trackCoords, returnPos.element }
: CoordsXYE{ *newCoords, returnPos.element };
returnPos = newCoords.has_value() ? CoordsXYE{ newCoords.value(), returnPos.element }
: CoordsXYE{ trackCoords, returnPos.element };
};
trackType = returnPos.element->AsTrack()->GetTrackType();