@@ -208,7 +208,13 @@ switch (_operation) do {
208208 case " unpack" : {
209209 private _group = _logic getVariable [" group" , grpNull ];
210210 private _fireMission = _logic getVariable [" fireMission" , []];
211- private _position = [_fireMission , " position" ] call ALIVE_fnc_hashGet ;
211+ private _position = [];
212+
213+ if (count _fireMission > 0 ) then {
214+ _position = [_fireMission , " position" ] call ALIVE_fnc_hashGet ;
215+ } else {
216+ _position = position _logic ;
217+ };
212218
213219 private _handle = [_group , position (leader _group ), _position ] spawn ALIVE_fnc_unpackMortar ;
214220
@@ -315,7 +321,16 @@ switch (_operation) do {
315321 } forEach _units ;
316322
317323 _logic setVariable [" fireMission" , []];
318- [_logic , " move" , [position _logic ]] call MAINCLASS;
324+
325+ [_logic ] spawn {
326+ private _logic = param [0 , objNull , [objNull ]];
327+
328+ [_logic , " pack" ] call MAINCLASS;
329+ waitUntil { [_logic , " hasPacked" ] call MAINCLASS };
330+ [_logic , " move" , [position _logic ]] call MAINCLASS;
331+ waitUntil { [_logic , " inPosition" ] call MAINCLASS };
332+ [_logic , " unpack" ] call MAINCLASS;
333+ };
319334 };
320335};
321336
0 commit comments