Page MenuHomeWildfire Games

Fix issues with MakeGoalReachable when the goal wasn't reachable following D1882/rP22817
ClosedPublic

Authored by wraitii on Sep 9 2019, 8:43 PM.

Details

Summary

D1882/rP22817 optimised MakeGoalReachable, but unfortunately I sorted regions by distance to the origin and not the goal, breaking the algorithm for the unreachable case.

This fixes it and adds a regression test (a new test case anyways). The test map wasn't big enough to properly detect this...

This bug was reported by faction02 in a forum https://wildfiregames.com/forum/index.php?/messenger/10014/ following an svn testgame

Test Plan

Notice that moving units in unreachable areas now behaves correctly.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

wraitii created this revision.Sep 9 2019, 8:43 PM
Vulcan added a comment.Sep 9 2019, 8:45 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/118/display/redirect

Vulcan added a comment.Sep 9 2019, 8:49 PM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/simulation2/components/tests/test_HierPathfinder.h
|  25| class·TestHierarchicalPathfinder·:·public·CxxTest::TestSuite
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classTestHierarchicalPathfinder:' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/627/display/redirect

This revision was not accepted when it landed; it landed in state Needs Review.Sep 9 2019, 8:58 PM
This revision was automatically updated to reflect the committed changes.
elexis edited the summary of this revision. (Show Details)Sep 10 2019, 11:20 AM