Page MenuHomeWildfire Games

Formation members shouldn't use IsWalkingAndFighting
ClosedPublic

Authored by temple on Mar 31 2018, 10:45 PM.

Details

Summary

Formation members get their orders from the formation controller, so they shouldn't use IsWalkingAndFighting.

Test Plan

Agree.

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

temple created this revision.Mar 31 2018, 10:45 PM
mimo added a subscriber: mimo.Apr 1 2018, 11:02 AM
mimo added inline comments.
binaries/data/mods/public/simulation/components/UnitAI.js
3326 ↗(On Diff #6296)

I've not tested it, so can't say for sure but that looks reasonnable.
But in that case, you should also remove lines 1271-1273 which i think are those which brings you there.

temple added inline comments.Apr 1 2018, 6:07 PM
binaries/data/mods/public/simulation/components/UnitAI.js
3326 ↗(On Diff #6296)

That's the member state for the formation controller, which it goes into after it tells members to do something. The members themselves are in the usual individual combat attacking state.

temple added inline comments.Apr 1 2018, 6:31 PM
binaries/data/mods/public/simulation/components/UnitAI.js
3326 ↗(On Diff #6296)

Eh, maybe could delete these two lines too. Is it possible for a unit to have an individual WalkAndFight or Patrol order and still be a member of some formation? Meh.

bb added a subscriber: bb.Apr 3 2018, 4:41 PM
bb added inline comments.
binaries/data/mods/public/simulation/components/UnitAI.js
3326 ↗(On Diff #6296)

All formation members should have the same order (afaik), so if one has WalkAndFight all have. Also giving 1 member of a formation such an order it will disband from the formation, so I guess the answer is no.

This revision was not accepted when it landed; it landed in state Needs Review.Apr 4 2018, 5:06 PM
This revision was automatically updated to reflect the committed changes.