HomeWildfire Games

Restore previous formation behaviour of targeting nearby enemies when idle /…
AuditedrP22506

Description

Restore previous formation behaviour of targeting nearby enemies when idle / aborting orders

This restores A23 formation behaviour, changed by rP22447. Units will now start attacking nearby enemies when the formation goes idle (such as when the abort order button is clicked).

This introduces a change that formation units that actually go idle will try to move back in formation shape, so it looks more like they're still in formation.

Fixes #5519.

Differential Revision: https://code.wildfiregames.com/D2097

Event Timeline

Freagarach raised a concern with this commit.Sep 27 2019, 10:32 PM
Freagarach added a subscriber: Freagarach.
Freagarach added inline comments.
/ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
1463

If this does not get removed somewhere, any formation member in the "IDLE" state will get thrown back to formationwalk, reaching a point, getting idle... well you know.

This commit now has outstanding concerns.Sep 27 2019, 10:32 PM
wraitii added inline comments.Sep 29 2019, 8:29 AM
/ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
1463

Not sure I understand - this is getting removed I think?

Freagarach added inline comments.Sep 29 2019, 8:30 AM
/ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
1463

I'm talking about this.formationOffset, which I could not find getting deleted ;)

wraitii added inline comments.Sep 29 2019, 8:31 AM
/ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
1463

Ah, yes. But I don't think that matters since it's always set when entering into a formation and formationController being there or not is correctly handled.

Have you actually noticed a bug in-game?

Freagarach added inline comments.Sep 29 2019, 8:35 AM
/ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
1463

Yes I have noticed that formation members keep receiving formationWalk-orders, even when supposed to be idle (they show idle state actually) :) Which led me here.

Freagarach accepted this commit.Dec 8 2019, 1:19 PM

My concern was fixed in rP23217.

All concerns with this commit have now been addressed.Dec 8 2019, 1:19 PM