Unload ViV before dragging/carrying

This commit is contained in:
johnb432 2024-07-17 13:56:37 +02:00
parent 5c895a2298
commit 623e77dbef
2 changed files with 10 additions and 0 deletions

View File

@ -19,6 +19,11 @@
params ["_unit", "_target"]; params ["_unit", "_target"];
TRACE_2("params",_unit,_target); TRACE_2("params",_unit,_target);
// If in ViV cargo, unload it first
if (!isNull isVehicleCargo _target) then {
objNull setVehicleCargo _target;
};
// Get attachTo offset and direction // Get attachTo offset and direction
private _position = _target getVariable [QGVAR(carryPosition), [0, 0, 0]]; private _position = _target getVariable [QGVAR(carryPosition), [0, 0, 0]];
private _direction = _target getVariable [QGVAR(carryDirection), 0]; private _direction = _target getVariable [QGVAR(carryDirection), 0];

View File

@ -19,6 +19,11 @@
params ["_unit", "_target"]; params ["_unit", "_target"];
TRACE_2("params",_unit,_target); TRACE_2("params",_unit,_target);
// If in ViV cargo, unload it first
if (!isNull isVehicleCargo _target) then {
objNull setVehicleCargo _target;
};
// Get attachTo offset and direction. // Get attachTo offset and direction.
private _position = _target getVariable [QGVAR(dragPosition), [0, 0, 0]]; private _position = _target getVariable [QGVAR(dragPosition), [0, 0, 0]];
private _direction = _target getVariable [QGVAR(dragDirection), 0]; private _direction = _target getVariable [QGVAR(dragDirection), 0];