1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +01:00

Add railway crossing behaviour for staff (#18057)

This commit is contained in:
Rik Smeets
2022-09-24 07:44:19 +02:00
committed by GitHub
parent 6be41893a4
commit 6c6ea169f1
7 changed files with 36 additions and 10 deletions

View File

@@ -5299,16 +5299,10 @@ void Guest::UpdateWalking()
}
}
// Check if vehicle is blocking the destination tile
auto curPos = TileCoordsXYZ(GetLocation());
auto dstPos = TileCoordsXYZ(CoordsXYZ{ GetDestination(), NextLoc.z });
if (curPos.x != dstPos.x || curPos.y != dstPos.y)
if (PathIsBlockedByVehicle())
{
if (footpath_is_blocked_by_vehicle(dstPos))
{
// Wait for vehicle to pass
return;
}
// Wait for vehicle to pass
return;
}
uint8_t pathingResult;