mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Zeus - Fix Group Side module (#9388)
Co-authored-by: jonpas <jonpas33@gmail.com>
This commit is contained in:
parent
4a12f61352
commit
119702a189
@ -44,11 +44,19 @@ if (GETVAR(_unit,ACE_isUnconscious,false) && {GETMVAR(EGVAR(medical,moveUnitsFro
|
||||
|
||||
_unit setVariable [QEGVAR(common,previousGroupSwitchTo), _previousGroupsList, true];
|
||||
} else {
|
||||
private _units = units _unit;
|
||||
|
||||
// Preserve assignedTeam for each unit
|
||||
{
|
||||
// Teams need to be gotten before removing units from group
|
||||
private _teams = _units apply {
|
||||
private _team = assignedTeam _x;
|
||||
[_team, "MAIN"] select (_team == "")
|
||||
};
|
||||
|
||||
{
|
||||
[_x] joinSilent _newGroup;
|
||||
_x assignTeam _team;
|
||||
} forEach units _unit;
|
||||
_x assignTeam (_teams select _forEachIndex);
|
||||
} forEach _units;
|
||||
|
||||
deleteGroup _oldGroup;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user