MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / Loc690FD0

Function Loc690FD0

src/openrct2/entity/Guest.cpp:6462–6497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6460 }
6461
6462 bool Loc690FD0(Guest& guest, RideId* rideToView, uint8_t* rideSeatToView, TileElement* tileElement)
6463 {
6464 auto ride = GetRide(tileElement->asTrack()->GetRideIndex());
6465 if (ride == nullptr)
6466 return false;
6467
6468 *rideToView = ride->id;
6469 if (ride->ratings.isNull())
6470 {
6471 *rideSeatToView = 1;
6472 if (ride->status != RideStatus::open)
6473 {
6474 if (tileElement->getClearanceZ() > guest.NextLoc.z + (8 * kCoordsZStep))
6475 {
6476 *rideSeatToView |= (1 << 1);
6477 }
6478
6479 return true;
6480 }
6481 }
6482 else
6483 {
6484 *rideSeatToView = 0;
6485 if (ride->status == RideStatus::open && !ride->flags.has(RideFlag::brokenDown))
6486 {
6487 if (tileElement->getClearanceZ() > guest.NextLoc.z + (8 * kCoordsZStep))
6488 {
6489 *rideSeatToView = 0x02;
6490 }
6491
6492 return true;
6493 }
6494 }
6495
6496 return false;
6497 }
6498
6499 /**
6500 *

Callers 1

GuestFindRideToLookAtFunction · 0.85

Calls 6

GetRideFunction · 0.85
getClearanceZMethod · 0.80
hasMethod · 0.65
GetRideIndexMethod · 0.45
asTrackMethod · 0.45
isNullMethod · 0.45

Tested by

no test coverage detected