Page MenuHomeWildfire Games

Fix slow formation movement on spam-click.
AbandonedPublic

Authored by Freagarach on Apr 7 2022, 4:56 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Trac Tickets
#6440
Summary

Every time a formation is told to move, it will reorganise. Even when it is already moving.
That means that its position is reset a little back (due to its members lagging behind per definition).
Spam issueing orders will therefore make the formation constantly reaccelerate, turn and whatsoever.

This fixes that by only adjusting the move order when given another move order, instead of reentering the state.
A different approach than D4593.

Test Plan

Spam move without this patch, to reproduce the behaviour. Play the replay with this patch and notice the difference.
Put an echo in the formation reform function to check the function is indeed called a lot less.

Think of edge cases why this might be bad.

Event Timeline

Freagarach created this revision.Apr 7 2022, 4:56 PM
Vulcan added a comment.Apr 7 2022, 5:00 PM

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

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

marder added a comment.Apr 7 2022, 5:10 PM

It indeed fixes the problem, but since the formation reposition functions are not called on every command anymore, this also mostly disables https://code.wildfiregames.com/rP26520

Vulcan added a comment.Apr 7 2022, 5:12 PM

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

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/5909/display/redirect

Freagarach requested review of this revision.Apr 7 2022, 5:12 PM
Freagarach updated this revision to Diff 20064.Apr 7 2022, 8:20 PM

It indeed fixes the problem, but since the formation reposition functions are not called on every command anymore, this also mostly disables https://code.wildfiregames.com/rP26520

Good point.

Vulcan added a comment.Apr 7 2022, 8:24 PM

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

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

Vulcan added a comment.Apr 7 2022, 8:35 PM

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

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/5910/display/redirect

Still seems like the updated version disables the formation recomputation

Freagarach abandoned this revision.May 6 2022, 7:33 AM

No clue why, and D4593 seem okay.