Skip to content

Commit

Permalink
Fix #9953: Crash when hacked rides attempt to find the closest mechanic
Browse files Browse the repository at this point in the history
  • Loading branch information
ZehMatt authored and Gymnasiast committed Oct 3, 2019
1 parent 5b41afa commit e4a2b1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions distribution/changelog.txt
Expand Up @@ -21,6 +21,7 @@
- Fix: [#9729] Peeps do not take into account height difference when deciding to pathfind to a ride entrance (original bug).
- Fix: [#9902] Doors/Portcullis do not check to make sure doors are open causing double opens.
- Fix: [#9926] Africa - Oasis park has wrong peep spawn (original bug).
- Fix: [#9953] Crash when hacked rides attempt to find the closest mechanic.
- Fix: [#9955] Resizing map in while pause mode does not work and may result in freezes.
- Fix: [#9957] When using 'no money' cheat, guests complain of running out of cash.
- Fix: [#9970] Wait for quarter load fails.
Expand Down
2 changes: 2 additions & 0 deletions src/openrct2/ride/Station.cpp
Expand Up @@ -356,6 +356,8 @@ TileElement* ride_get_station_exit_element(int32_t x, int32_t y, int32_t z)
TileElement* tileElement = map_get_first_element_at(x, y);
do
{
if (tileElement == nullptr)
break;
if (tileElement->GetType() == TILE_ELEMENT_TYPE_ENTRANCE && z == tileElement->base_height)
return tileElement;
} while (!(tileElement++)->IsLastForTile());
Expand Down

0 comments on commit e4a2b1f

Please sign in to comment.