Skip to content

Commit

Permalink
stash
Browse files Browse the repository at this point in the history
  • Loading branch information
commy2 committed Oct 14, 2018
1 parent 51f03d5 commit 9bad948
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions addons/ui/fnc_openLobbyManager.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ _ctrlButtonOK ctrlAddEventHandler ["ButtonClick", {
private _leader = objNull;
private _units = [];
private _groups = [];
private _currentSelected = get3DENSelected "";

private _dummies = [];
private _dummyGroup = createGroup civilian;

// adjust unit order
for "_index" from 0 to (lbSize _ctrlSlots - 1) do {
Expand All @@ -232,7 +234,8 @@ _ctrlButtonOK ctrlAddEventHandler ["ButtonClick", {
_units = [];
_groups pushBack _group;

_group deleteGroupWhenEmpty false;
private _dummy = _dummyGroup createUnit ["C_man_1", [0,0,0], [], 0, "NONE"];
[_dummy] joinSilent _group;
} else {
private _slotName = _entity getVariable QGVAR(description);
private _groupName = _group getVariable [QGVAR(description), ""];
Expand All @@ -257,11 +260,26 @@ _ctrlButtonOK ctrlAddEventHandler ["ButtonClick", {

// adjust group order
{
set3DENSelected [_x];
diag_log [0, count allGroups];
diag_log get3DENSelected "";
diag_log ["units: ", _x, units _x];
set3DENSelected ([_x] + units _x);diag_log ["select: ", _x];
diag_log get3DENSelected "";
do3DENAction "CutUnit";
do3DENAction "PasteUnitOrig";
diag_log [1, count allGroups];
diag_log get3DENSelected "";
} forEach _groups;

set3DENSelected _currentSelected;
{
deleteVehicle _x;
} forEach _dummies;
deleteGroup _dummyGroup;

set3DENSelected [];
};
}];




0 comments on commit 9bad948

Please sign in to comment.