From 9bad948a5af4fd222720f276a0ccf032ed115133 Mon Sep 17 00:00:00 2001 From: commy2 Date: Sun, 14 Oct 2018 12:24:43 +0200 Subject: [PATCH] stash --- addons/ui/fnc_openLobbyManager.sqf | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/addons/ui/fnc_openLobbyManager.sqf b/addons/ui/fnc_openLobbyManager.sqf index f05b48cd0..8d24ee5db 100644 --- a/addons/ui/fnc_openLobbyManager.sqf +++ b/addons/ui/fnc_openLobbyManager.sqf @@ -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 { @@ -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), ""]; @@ -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 []; }; }]; + + + +