Skip to content

Commit

Permalink
Fix RTB behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
marceldev89 committed Oct 19, 2017
1 parent ed7dc3b commit 6e5a339
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions addons/sup_artillery/fnc_artillery.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,13 @@ switch (_operation) do {
case "unpack": {
private _group = _logic getVariable ["group", grpNull];
private _fireMission = _logic getVariable ["fireMission", []];
private _position = [_fireMission, "position"] call ALIVE_fnc_hashGet;
private _position = [];

if (count _fireMission > 0) then {
_position = [_fireMission, "position"] call ALIVE_fnc_hashGet;
} else {
_position = position _logic;
};

private _handle = [_group, position (leader _group), _position] spawn ALIVE_fnc_unpackMortar;

Expand Down Expand Up @@ -315,7 +321,16 @@ switch (_operation) do {
} forEach _units;

_logic setVariable ["fireMission", []];
[_logic, "move", [position _logic]] call MAINCLASS;

[_logic] spawn {
private _logic = param [0, objNull, [objNull]];

[_logic, "pack"] call MAINCLASS;
waitUntil { [_logic, "hasPacked"] call MAINCLASS };
[_logic, "move", [position _logic]] call MAINCLASS;
waitUntil { [_logic, "inPosition"] call MAINCLASS };
[_logic, "unpack"] call MAINCLASS;
};
};
};

Expand Down

0 comments on commit 6e5a339

Please sign in to comment.