1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 13:42:55 +01:00

Remove direct access to DirectionX and DirectionY

This commit is contained in:
Matt
2021-02-10 20:47:11 +02:00
parent 2bb5bb9988
commit 965041b437
9 changed files with 123 additions and 158 deletions

View File

@@ -96,8 +96,8 @@ protected:
// tile away. Stepping the peep will move them towards their destination, and once they reach it, a new
// destination will be picked, to try and get the peep towards the overall pathfinding goal.
peep->PeepDirection = moveDir;
peep->DestinationX = peep->x + CoordsDirectionDelta[moveDir].x;
peep->DestinationY = peep->y + CoordsDirectionDelta[moveDir].y;
auto destination = CoordsDirectionDelta[moveDir] + peep->GetLocation();
peep->SetDestination(destination);
peep->DestinationTolerance = 2;
// Repeatedly step the peep, until they reach the target position or until the expected number of steps have