diff --git a/addons/common/functions/fnc_canInteractWith.sqf b/addons/common/functions/fnc_canInteractWith.sqf index b67e57964f..62fbba322e 100644 --- a/addons/common/functions/fnc_canInteractWith.sqf +++ b/addons/common/functions/fnc_canInteractWith.sqf @@ -21,10 +21,11 @@ params ["_unit", "_target", ["_exceptions", []]]; _exceptions = _exceptions apply {toLower _x}; -private _owner = _target getVariable [QGVAR(owner), objNull]; - // exit if the target is not free to interact -if (!isNull _owner && {_unit != _owner}) exitWith {false}; +if ((!isNull _target) && { + private _owner = _target getVariable [QGVAR(owner), objNull]; + (!isNull _owner) && {_unit != _owner}} +) exitWith {false}; // check general conditions private _conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]]; diff --git a/addons/movement/functions/fnc_handleVirtualMass.sqf b/addons/movement/functions/fnc_handleVirtualMass.sqf index 8f035cc5ad..f2c0655b5c 100644 --- a/addons/movement/functions/fnc_handleVirtualMass.sqf +++ b/addons/movement/functions/fnc_handleVirtualMass.sqf @@ -23,7 +23,9 @@ if (isNull _unit) exitWith {}; private _virtualLoad = 0; { - _virtualLoad = _virtualLoad + (_x getVariable [QGVAR(vLoad), 0]); + if (!isNull _x) then { + _virtualLoad = _virtualLoad + (_x getVariable [QGVAR(vLoad), 0]); + }; } forEach [ _unit, uniformContainer _unit,