mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 06:44:38 +01:00
Fix #9322: Peep crashing the game trying to find a ride to look at
This commit is contained in:
committed by
Michael Steenbeek
parent
67f1359936
commit
bc14f427a5
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user