mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #10535: Guests stuck at some level crossings
The location of the back vehicle itself should be included in determining whether to clear the 'blocked by vehicle' flag on footpath. Otherwise, in specific cases, blocked footpath can be missed and therefore this flag wouldn't ever be cleared.
This commit is contained in:
parent
189ebbced7
commit
9e68226df0
|
@ -29,6 +29,7 @@
|
|||
- Change: [#17762] Use vertical tabs in the New Game dialog.
|
||||
- Fix: [#5141] Headless server is counted as a player.
|
||||
- Fix: [#7466] Coaster track not drawn at tunnel exit.
|
||||
- Fix: [#10535] Guests getting stuck at specific level crossings.
|
||||
- Fix: [#14337] Guest blocking ride entrance after ride price changed to be unaffordable.
|
||||
- Fix: [#15328] Wooden Roller Coaster incorrectly draws a railing on the first station piece (original bug).
|
||||
- Fix: [#16392] Scenery on sloped surface is placed at wrong height.
|
||||
|
|
|
@ -9258,18 +9258,18 @@ void Vehicle::UpdateCrossings() const
|
|||
uint8_t freeCount = travellingForwards ? 3 : 1;
|
||||
while (freeCount-- > 0)
|
||||
{
|
||||
if (travellingForwards && track_block_get_previous(xyElement, &output))
|
||||
{
|
||||
xyElement.x = output.begin_x;
|
||||
xyElement.y = output.begin_y;
|
||||
xyElement.element = output.begin_element;
|
||||
}
|
||||
|
||||
auto* pathElement = map_get_path_element_at(TileCoordsXYZ(CoordsXYZ{ xyElement, xyElement.element->GetBaseZ() }));
|
||||
if (pathElement != nullptr)
|
||||
{
|
||||
pathElement->SetIsBlockedByVehicle(false);
|
||||
}
|
||||
|
||||
if (travellingForwards && freeCount > 0 && track_block_get_previous(xyElement, &output))
|
||||
{
|
||||
xyElement.x = output.begin_x;
|
||||
xyElement.y = output.begin_y;
|
||||
xyElement.element = output.begin_element;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue