-
-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Need some logging first (separate task) before I could ever consider this fixed.
Additionally I need to make sure the group limit never reaches 144. I saw a suggestion that groups could possibly be reused which would be smart, but would need to investigate a tracking method + consequences of anything persisting (orders, waypoints).
As far as I remember when the last unit of a group is killed that group disbands, so I don't know if persistence of empty groups will work unless I assign some unkillable unit to it to persist.
This would also fundamentally need to touch units that are also handled in the editor in addition to scripting would could be annoying - but maybe I just have some server logic that eradicates any existing grouping on mission start to recreate it so it can be tracked via code (though this might clash with player grouping, or we just always assume 144 - max player spawn groups which is like 6).
Separately it might be smart to have this lower than the group limit (say 140) so if a bug ever causes the creation of new groups we aren't maxing out persistent groups to the group limit and making everyone spawn in as birds.
Theory: Add 1 static unkillable/invisible unit to 140 (- 6) groups at mission start (side can be whatever we could just change that units side to the same side of the new units once we find a group to use), loop through finding which only has this unit to then populate a new squad to occupy that group. If all groups are looped and all are occupied, ignore what ever wants to make new units and maybe log that.