Fix formation merging issues.
commit6bd0c8e03f6447594f4eaa5de77a823afdaacebb
authorFreagarach <Freagarach@3db68df2-c116-0410-a063-a993310a9797>
Thu, 30 Jun 2022 06:04:05 +0000 (30 06:04 +0000)
committerFreagarach <Freagarach@3db68df2-c116-0410-a063-a993310a9797>
Thu, 30 Jun 2022 06:04:05 +0000 (30 06:04 +0000)
treefaf29ab057ee79efd111e20af778c621d92149ec
parentabbe5ac38f75304fca24fa4c7df3d712d82ddfd9
Fix formation merging issues.

The motion parameters were calculated even without members, which caused us to try set a undefined passclass.
Also were members added to previously merged twin-formations. Once merged (i.e. disbanded), they are moved out of world now.

Some cleanups/deduplication whilst at it.

Reported by: @andy5995 at the forums (https://wildfiregames.com/forum/topic/71578-feedbacks-from-a26-svn-tests/page/8/#comment-505078)
Differential revision: https://code.wildfiregames.com/D4727
Comments by: @Langbart, @marder
Tested by: @Langbart
Fixes #6580

git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@26993 3db68df2-c116-0410-a063-a993310a9797
binaries/data/mods/public/simulation/components/Formation.js
binaries/data/mods/public/simulation/components/UnitAI.js