mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Dragging - Fix dragging/carrying failing for items in ViV (#10128)
* Unload ViV before dragging/carrying * Update addons/dragging/functions/fnc_carryObject.sqf Co-authored-by: PabstMirror <pabstmirror@gmail.com> * Use lazy eval to check if item was unloaded --------- Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
parent
8ab36f64ff
commit
05ab1bbe99
@ -19,6 +19,12 @@
|
||||
params ["_unit", "_target"];
|
||||
TRACE_2("params",_unit,_target);
|
||||
|
||||
// If in ViV cargo, unload it first
|
||||
// Warn user if it failed to unload (shouldn't happen)
|
||||
if (!isNull isVehicleCargo _target && {!(objNull setVehicleCargo _target)}) then {
|
||||
WARNING_1("ViV Unload Failed %1",_target);
|
||||
};
|
||||
|
||||
// Get attachTo offset and direction
|
||||
private _position = _target getVariable [QGVAR(carryPosition), [0, 0, 0]];
|
||||
private _direction = _target getVariable [QGVAR(carryDirection), 0];
|
||||
|
@ -19,6 +19,12 @@
|
||||
params ["_unit", "_target"];
|
||||
TRACE_2("params",_unit,_target);
|
||||
|
||||
// If in ViV cargo, unload it first
|
||||
// Warn user if it failed to unload (shouldn't happen)
|
||||
if (!isNull isVehicleCargo _target && {!(objNull setVehicleCargo _target)}) then {
|
||||
WARNING_1("ViV Unload Failed %1",_target);
|
||||
};
|
||||
|
||||
// Get attachTo offset and direction.
|
||||
private _position = _target getVariable [QGVAR(dragPosition), [0, 0, 0]];
|
||||
private _direction = _target getVariable [QGVAR(dragDirection), 0];
|
||||
|
Loading…
x
Reference in New Issue
Block a user