mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
parent
f7b520b56b
commit
a0dd4400e6
@ -2,9 +2,9 @@
|
||||
|
||||
["ace_addCargo", {_this call FUNC(addCargoItem)}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(paradropItem), {
|
||||
params ["_item", "_vehicle"];
|
||||
params ["_item", "_vehicle", ["_showHint", true]];
|
||||
|
||||
private _unloaded = [_item, _vehicle] call FUNC(paradropItem);
|
||||
private _unloaded = [_item, _vehicle, _showHint] call FUNC(paradropItem);
|
||||
|
||||
if (_unloaded && {GVAR(openAfterUnload) in [2, 3]}) then {
|
||||
GVAR(interactionVehicle) = _vehicle;
|
||||
|
@ -49,7 +49,7 @@ if (_item isEqualType objNull) then {
|
||||
_object setPosASL (AGLtoASL _posBehindVehicleAGL);
|
||||
};
|
||||
|
||||
_object setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vectorDir _vehicle)) vectorMultiply -5));
|
||||
[QEGVAR(common,setVelocity), [_object, ((velocity _vehicle) vectorAdd ((vectorNormalized (vectorDir _vehicle)) vectorMultiply -5))], _object] call CBA_fnc_targetEvent;
|
||||
|
||||
// open parachute and ir light effect
|
||||
[{
|
||||
@ -59,13 +59,20 @@ _object setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vectorDir
|
||||
|
||||
private _parachute = createVehicle ["B_Parachute_02_F", [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||
|
||||
// Prevent collision damage
|
||||
[QEGVAR(common,fixCollision), _parachute] call CBA_fnc_localEvent;
|
||||
[QEGVAR(common,fixCollision), _object, _object] call CBA_fnc_targetEvent;
|
||||
|
||||
// cannot use setPos on parachutes without them closing down
|
||||
_parachute attachTo [_object, [0,0,0]];
|
||||
detach _parachute;
|
||||
|
||||
private _velocity = velocity _object;
|
||||
|
||||
_object attachTo [_parachute, [0,0,1]];
|
||||
// Attach to the middle of the object
|
||||
(2 boundingBoxReal _object) params ["_bb1", "_bb2"];
|
||||
|
||||
_object attachTo [_parachute, [0, 0, ((_bb2 select 2) - (_bb1 select 2)) / 2]];
|
||||
_parachute setVelocity _velocity;
|
||||
|
||||
if ((GVAR(disableParadropEffectsClasstypes) findIf {_object isKindOf _x}) == -1) then {
|
||||
|
Loading…
Reference in New Issue
Block a user