Skip to content

Commit

Permalink
Fix #9844: Guests can't enter park
Browse files Browse the repository at this point in the history
  • Loading branch information
IntelOrca committed Aug 10, 2019
1 parent 132a191 commit d730a76
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/openrct2/peep/Peep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2375,10 +2375,6 @@ static void peep_return_to_centre_of_tile(Peep* peep)
static void peep_interact_with_entrance(Peep* peep, int16_t x, int16_t y, TileElement* tile_element, uint8_t& pathing_result)
{
uint8_t entranceType = tile_element->AsEntrance()->GetEntranceType();
ride_id_t rideIndex = tile_element->AsEntrance()->GetRideIndex();
auto ride = get_ride(rideIndex);
if (ride == nullptr)
return;

// Store some details to determine when to override the default
// behaviour (defined below) for when staff attempt to enter a ride
Expand All @@ -2405,6 +2401,11 @@ static void peep_interact_with_entrance(Peep* peep, int16_t x, int16_t y, TileEl

if (entranceType == ENTRANCE_TYPE_RIDE_ENTRANCE)
{
auto rideIndex = tile_element->AsEntrance()->GetRideIndex();
auto ride = get_ride(rideIndex);
if (ride == nullptr)
return;

auto guest = peep->AsGuest();
if (guest == nullptr)
{
Expand Down

2 comments on commit d730a76

@Broxzier
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably needs a network version bump too, since it changes how guests behave.

@IntelOrca
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done 馃憤

Please sign in to comment.