mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fix twice parachute
- acify
This commit is contained in:
parent
74c4b274ff
commit
0025268eb0
@ -23,4 +23,4 @@ params [
|
||||
|
||||
driver _vehicle isEqualTo _unit &&
|
||||
{isClass (configOf _vehicle >> "VehicleTransport" >> "Carrier")} &&
|
||||
{!([_vehicle] call ace_cargo_fnc_getVehicleCargo isEqualTo [])}
|
||||
{!([_vehicle] call FUNC(getVehicleCargo) isEqualTo [])}
|
||||
|
@ -29,7 +29,7 @@ private _distBehind = ((_bb1 select 1) min (_bb2 select 1)) - 4; // 4 meters beh
|
||||
TRACE_1("",_distBehind);
|
||||
private _posBehindVehicleAGL = _vehicle modelToWorld [0, _distBehind, -2];
|
||||
|
||||
private _object = [_item, _posBehindVehicleAGL, _loaded, _vehicle] call ace_cargo_fnc_unload;
|
||||
private _object = [_item, _posBehindVehicleAGL, _loaded, _vehicle, true] call FUNC(unload);
|
||||
|
||||
_object setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vectorDir _vehicle)) vectorMultiply -5));
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
* 1: Empty position <ARRAY>
|
||||
* 2: Items loaded in cargo <ARRAY>
|
||||
* 3: Vehicle with the item loaded <OBJECT>
|
||||
* 4: Avoid creation of a parachute by A3 <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* Object unloaded <OBJECT>
|
||||
@ -18,7 +19,7 @@
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_item", "_posAGL", "_loaded", "_vehicle"];
|
||||
params ["_item", "_posAGL", "_loaded", "_vehicle", "_isParadrop"];
|
||||
|
||||
_loaded deleteAt (_loaded find _item);
|
||||
_vehicle setVariable [QGVAR(loaded), _loaded, true];
|
||||
@ -45,8 +46,12 @@ if (_object isEqualType objNull) then {
|
||||
deleteVehicle _cargoNet;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
if (_isParadrop) then {
|
||||
detach _object; // Don't create a parachute by A3 engine
|
||||
} else {
|
||||
objNull setVehicleCargo _object;
|
||||
};
|
||||
_object setPosASL (AGLtoASL _posAGL);
|
||||
};
|
||||
} else {
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
params ["_vehicle"];
|
||||
|
||||
private _loadedVehicles = [_vehicle] call ace_cargo_fnc_getVehicleCargo;
|
||||
private _loadedVehicles = [_vehicle] call FUNC(getVehicleCargo);
|
||||
private _unloadingInterval = getNumber (configOf _vehicle >> "VehicleTransport" >> "Carrier" >> "unloadingInterval");
|
||||
{
|
||||
[{objnull setVehicleCargo _this}, _x, _forEachIndex * _unloadingInterval] call CBA_fnc_waitAndExecute;
|
||||
|
@ -40,7 +40,7 @@ if !(_item in _loaded) exitWith {
|
||||
false
|
||||
};
|
||||
|
||||
private _object = [_item, _emptyPosAGL, _loaded, _vehicle] call ace_cargo_fnc_unload;
|
||||
private _object = [_item, _emptyPosAGL, _loaded, _vehicle, false] call FUNC(unload);
|
||||
|
||||
// Invoke listenable event
|
||||
["ace_cargoUnloaded", [_object, _vehicle, "unload"]] call CBA_fnc_globalEvent;
|
||||
|
Loading…
Reference in New Issue
Block a user