mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 23:34:37 +01:00
Use RideId::GetNull and RideId::IsNull over constant
This commit is contained in:
@@ -586,7 +586,7 @@ bool Staff::DoHandymanPathFinding()
|
||||
if (litterDirection != INVALID_DIRECTION && pathDirections & (1 << litterDirection))
|
||||
{
|
||||
/// Check whether path is a queue path and connected to a ride
|
||||
bool connectedQueue = (pathElement->IsQueue() && pathElement->GetRideIndex() != RIDE_ID_NULL);
|
||||
bool connectedQueue = (pathElement->IsQueue() && !pathElement->GetRideIndex().IsNull());
|
||||
/// When in a queue path make the probability of following litter much lower (10% instead of 90%)
|
||||
/// as handymen often get stuck when there is litter on a normal path next to a queue they are in
|
||||
uint32_t chooseRandomProbability = connectedQueue ? 0xE666 : 0x1999;
|
||||
@@ -783,7 +783,7 @@ Direction Staff::MechanicDirectionPath(uint8_t validDirections, PathElement* pat
|
||||
gPeepPathFindGoalPosition.z = location.z;
|
||||
|
||||
gPeepPathFindIgnoreForeignQueues = false;
|
||||
gPeepPathFindQueueRideIndex = RIDE_ID_NULL;
|
||||
gPeepPathFindQueueRideIndex = RideId::GetNull();
|
||||
|
||||
#if defined(DEBUG_LEVEL_1) && DEBUG_LEVEL_1
|
||||
PathfindLoggingEnable(this);
|
||||
|
||||
Reference in New Issue
Block a user