Page MenuHomeWildfire Games

Fix formationmember not leaving walking state if offset cannot be reached
AbandonedPublic

Authored by Angen on Nov 23 2019, 1:33 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP23496: Fix formationmember not leaving walking state if offset cannot be reached
Summary

Currently if formation arrives into destination and member goes to IDLE only after reaching the offset.

Problem with not sending failure message for member which is likely stucked because of obstruction, is that in case offset is on position of that obstruction, member never leaves walking state however is appearing like idle, because of movement animation handling by movement component itself introduced in rP22446, what was not bad decision by itself, but it hides units not leaving in walking states.

Main problems with this are units spamming unitmotion trying to get to the goal and they will never move there and units not entering IDLE state, so they never respond to enemies around or injured fellows that need healing.

Solution in this patch is to fail if formation is not going to move and unit cannot reach destination.

Steps to reproduce:
Most likely to happen more often during game: Form bigger formation around stone mine or something similar.
Kind of extreme case: Form formation right after start with units at opposite sides of cc.
Use developer tool display selection state to confirm real state of the unit.

Showcase of patch:
All units at picture are in idle state, even they should stay at the places where obstruction is so they cant.

Test Plan

Confirm members do not stay in walking state anymore when formation is at destination, or formation have been stopped.
Confirm members do catch up formation while formation is moving and even when formation have arrived to destination (member does find way around objects when its goal offset is not in that object)
Confirm members do gather, hunt, build, ... in the same way as without patch (there is no new issue).
Confirm queuing orders to formation works as intended.

Event Timeline

Angen created this revision.Nov 23 2019, 1:33 PM
Owners added a subscriber: Restricted Owners Package.Nov 23 2019, 1:33 PM

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

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

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

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

Angen edited the summary of this revision. (Show Details)Nov 23 2019, 1:41 PM
Angen added a reviewer: Restricted Owners Package.Nov 25 2019, 11:34 AM

I tested it and couldn't break it ;)
Even when obstruction is removed, the formation members go to their correct position.

Stan awarded a token.Nov 26 2019, 5:44 PM
Stan added a subscriber: Stan.Dec 9 2019, 3:34 PM
Stan added inline comments.
source/simulation2/components/CCmpUnitMotion.cpp
767–768

"the formation controller"? Missing final .

Angen updated this revision to Diff 10549.Dec 9 2019, 9:17 PM

simplify and rename

Vulcan added a comment.Dec 9 2019, 9:19 PM

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

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

Vulcan added a comment.Dec 9 2019, 9:26 PM

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

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

Angen abandoned this revision.Thu, Feb 13, 9:13 PM