Page MenuHomeWildfire Games

ComputeMotionParameters correctly when formation member is added or removed
Needs ReviewPublic

Authored by Angen on Sun, Dec 1, 12:54 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
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.

Event Timeline

Angen created this revision.Sun, Dec 1, 12:54 PM
Vulcan added a comment.Sun, Dec 1, 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.Sun, Dec 1, 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

Angen added a reviewer: Restricted Owners Package.Fri, Dec 6, 9:45 AM