Page MenuHomeWildfire Games

UnitMotion - clarify what CheckTargetMovement is doing, improve the logic.
ClosedPublic

Authored by wraitii on Jun 15 2019, 9:45 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP22430: UnitMotion - rename CheckTargetMovement to PathingUpdateNeeded for clarity, and…
Summary

CheckTargetMovement was the function in charge of updating the goal if the target has moved / we wouldn't reach it with our current path.

It did a pretty shoddy (and weird) job of it.
This new version compares our final waypoint with the goal and uses reachability checks to know if we will be in range or not.

Test Plan

Compare unit behaviour when chasing a target.

Diff Detail

Event Timeline

wraitii created this revision.Jun 15 2019, 9:45 PM

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

Link to build: https://jenkins.wildfiregames.com/job/differential/1735/display/redirect

wraitii updated this revision to Diff 8696.Jul 2 2019, 10:39 PM

Correct handling of no-waypoint situation, and use BeginPathing to benefit from direct/short-range movement to unstuck some units.

With this diff whales roaming is fixed. Chasing is improved but still needs D1987 to really connect.

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

Link to build: https://jenkins.wildfiregames.com/job/differential/1879/display/redirect

Some self-review

source/simulation2/components/CCmpUnitMotion.cpp
1068–1070

Move comment below

1081

There's a more straightforward way to write this

1099

Perhaps introduce/expose an "AreShapesInRange" function in the obstruction manager?

wraitii updated this revision to Diff 8705.Jul 3 2019, 6:29 PM

Use a function in ObstructionManager for range check, improve function.

Vulcan added a comment.Jul 3 2019, 6:36 PM

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

Link to build: https://jenkins.wildfiregames.com/job/differential/1886/display/redirect

Vulcan added a comment.Jul 3 2019, 7:53 PM

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

Link to build: https://jenkins.wildfiregames.com/job/differential/1890/display/redirect

This revision was not accepted when it landed; it landed in state Needs Review.Jul 3 2019, 8:07 PM
This revision was automatically updated to reflect the committed changes.