1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 22:34:33 +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

@@ -321,6 +321,18 @@ bool Peep::CheckForPath()
return false;
}
bool Peep::PathIsBlockedByVehicle()
{
auto curPos = TileCoordsXYZ(GetLocation());
auto dstPos = TileCoordsXYZ(CoordsXYZ{ GetDestination(), NextLoc.z });
if ((curPos.x != dstPos.x || curPos.y != dstPos.y) && footpath_is_blocked_by_vehicle(dstPos))
{
return true;
}
return false;
}
PeepActionSpriteType Peep::GetActionSpriteType()
{
if (IsActionInterruptable())