1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Fix #9322: Peep crashing the game trying to find a ride to look at

This commit is contained in:
ζeh Matt
2019-05-30 20:49:54 +02:00
committed by Michael Steenbeek
parent 67f1359936
commit bc14f427a5
2 changed files with 16 additions and 0 deletions

View File

@@ -48,6 +48,7 @@
- Fix: [#9202] Artefacts show when changing ride type as client or using in-game console.
- Fix: [#9240] Crash when passing directory instead of save file.
- Fix: [#9293] Issue with the native load/save dialog.
- Fix: [#9322] Peep crashing the game trying to find a ride to look at.
- Fix: Guests eating popcorn are drawn as if they're eating pizza.
- Fix: The arbitrary ride type and vehicle dropdown lists are ordered case-sensitively.
- Improved: [#6116] Expose colour scheme for track elements in the tile inspector.

View File

@@ -6278,6 +6278,11 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, uint8_t* rideToV
surfaceElement = map_get_surface_element_at({ peep->next_x, peep->next_y });
tileElement = surfaceElement;
if (tileElement == nullptr)
{
return false;
}
do
{
// Ghosts are purely this-client-side and should not cause any interaction,
@@ -6312,6 +6317,11 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, uint8_t* rideToV
surfaceElement = map_get_surface_element_at({ x, y });
tileElement = surfaceElement;
if (tileElement == nullptr)
{
return false;
}
do
{
// Ghosts are purely this-client-side and should not cause any interaction,
@@ -6541,6 +6551,11 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, uint8_t* rideToV
// TODO: extract loop A
tileElement = surfaceElement;
if (tileElement == nullptr)
{
return false;
}
do
{
// Ghosts are purely this-client-side and should not cause any interaction,