mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 10:21:57 -05:00
Merge pull request #12344 from Ron4u/fixed-issue-12335
Close #12335: Eliminate goto statement in footpath_chain_ride_queue()
This commit is contained in:
commit
12cc413732
1 changed files with 7 additions and 4 deletions
|
@ -1082,6 +1082,7 @@ void footpath_chain_ride_queue(
|
|||
|
||||
auto targetQueuePos = curQueuePos + CoordsDirectionDelta[direction];
|
||||
tileElement = map_get_first_element_at(targetQueuePos);
|
||||
bool foundQueue = false;
|
||||
if (tileElement != nullptr)
|
||||
{
|
||||
do
|
||||
|
@ -1097,7 +1098,8 @@ void footpath_chain_ride_queue(
|
|||
if (tileElement->AsPath()->GetSlopeDirection() != direction)
|
||||
break;
|
||||
}
|
||||
goto foundNextPath;
|
||||
foundQueue = true;
|
||||
break;
|
||||
}
|
||||
if (tileElement->GetBaseZ() == baseZ - LAND_HEIGHT_STEP)
|
||||
{
|
||||
|
@ -1108,13 +1110,14 @@ void footpath_chain_ride_queue(
|
|||
break;
|
||||
|
||||
baseZ -= LAND_HEIGHT_STEP;
|
||||
goto foundNextPath;
|
||||
foundQueue = true;
|
||||
break;
|
||||
}
|
||||
} while (!(tileElement++)->IsLastForTile());
|
||||
}
|
||||
break;
|
||||
if (!foundQueue)
|
||||
break;
|
||||
|
||||
foundNextPath:
|
||||
if (tileElement->AsPath()->IsQueue())
|
||||
{
|
||||
// Fix #2051: Stop queue paths that are already connected to two other tiles
|
||||
|
|
Loading…
Reference in a new issue