Page MenuHomeWildfire Games

ComputeMotionParameters correctly when formation member is added or removed
ClosedPublic

Authored by Silier on Dec 1 2019, 12:54 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP23223: ComputeMotionParameters correctly when formation member is added or removed
Summary

As noticed by @bb in https://code.wildfiregames.com/D1727?id=7276#inline-38148 and found issue in https://code.wildfiregames.com/rP11934#inline-4563 ComputeMotionParameters is not called correctly.

One problem is when merging twinformations, addMembers does not update speed, so if one formation contains slowest unit and it is merged to formation which does not, merged formation will move faster than it should, the same problem applies if unit is added calling function from outside of component.

Another problem is when from formation is removed slowest unit and has rearrange set to false. Having speed computation after rearrange check means formation is not going to move faster if slowest member is removed by player or killed (but it will if player recreates formation manually)

Test Plan

Test that formation starts moving faster when slowest unit is removed.
Test that merging two twin formations A and B where there is just one slowest and it is in A for example, will slow down merged formation.

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

Silier created this revision.Dec 1 2019, 12:54 PM
Vulcan added a comment.Dec 1 2019, 1:01 PM

Build failure - The Moirai have given mortals hearts that can endure.

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

Vulcan added a comment.Dec 1 2019, 1:03 PM

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

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

Silier added a reviewer: Restricted Owners Package.Dec 6 2019, 9:45 AM
This revision was not accepted when it landed; it landed in state Needs Review.Dec 8 2019, 2:59 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.