1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

Allow passing of destination tolerance via SetDestination

This commit is contained in:
Matt
2021-02-10 21:18:27 +02:00
parent 965041b437
commit 62baee3adb
8 changed files with 47 additions and 79 deletions

View File

@@ -97,8 +97,7 @@ protected:
// destination will be picked, to try and get the peep towards the overall pathfinding goal.
peep->PeepDirection = moveDir;
auto destination = CoordsDirectionDelta[moveDir] + peep->GetLocation();
peep->SetDestination(destination);
peep->DestinationTolerance = 2;
peep->SetDestination(destination, 2);
// Repeatedly step the peep, until they reach the target position or until the expected number of steps have
// elapsed. Each step, check that the tile they are standing on is not marked as forbidden in the test data