1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-11 01:52:32 +01:00

Debunch peeps (#12917)

* Stop guests from being forced to the center line of a path over time

Change the way we apply randomness to peep destinations when moving from one tile to the next, to allow peeps that are moving along a straight path to maintain their perpendicular offset relative to the path direction, instead of being (eventually) forced back to the center line.

* Update test expectations

The changes to guest movement mean that the number of steps taken for these expected paths are now slightly different to before.
This commit is contained in:
Richard Fine
2020-11-03 20:30:36 -05:00
committed by GitHub
parent faf10568bb
commit 438b197b80
6 changed files with 36 additions and 11 deletions

View File

@@ -215,13 +215,13 @@ TEST_P(SimplePathfindingTest, CanFindPathFromStartToGoal)
INSTANTIATE_TEST_CASE_P(
ForScenario, SimplePathfindingTest,
::testing::Values(
SimplePathfindingScenario("StraightFlat", { 19, 15, 14 }, 24), SimplePathfindingScenario("SBend", { 15, 12, 14 }, 88),
SimplePathfindingScenario("UBend", { 17, 9, 14 }, 86), SimplePathfindingScenario("CBend", { 14, 5, 14 }, 164),
SimplePathfindingScenario("TwoEqualRoutes", { 9, 13, 14 }, 87),
SimplePathfindingScenario("TwoUnequalRoutes", { 3, 13, 14 }, 87),
SimplePathfindingScenario("StraightFlat", { 19, 15, 14 }, 24), SimplePathfindingScenario("SBend", { 15, 12, 14 }, 87),
SimplePathfindingScenario("UBend", { 17, 9, 14 }, 87), SimplePathfindingScenario("CBend", { 14, 5, 14 }, 164),
SimplePathfindingScenario("TwoEqualRoutes", { 9, 13, 14 }, 89),
SimplePathfindingScenario("TwoUnequalRoutes", { 3, 13, 14 }, 89),
SimplePathfindingScenario("StraightUpBridge", { 12, 15, 14 }, 24),
SimplePathfindingScenario("StraightUpSlope", { 14, 15, 14 }, 24),
SimplePathfindingScenario("SelfCrossingPath", { 6, 5, 14 }, 213)),
SimplePathfindingScenario("SelfCrossingPath", { 6, 5, 14 }, 211)),
SimplePathfindingScenario::ToName);
class ImpossiblePathfindingTest : public PathfindingTestBase, public ::testing::WithParamInterface<SimplePathfindingScenario>