diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index b9c9840cfc..bd363b1307 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -19,7 +19,8 @@ private ["_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID", "_model"]; params ["_attachToVehicle","_unit","_args"]; -_args params [["_itemClassname",""]]; +_args params [["_itemClassname","", [""]]]; +TRACE_3("params",_attachToVehicle,_unit,_itemClassname); //Sanity Check (_unit has item in inventory, not over attach limit) if ((_itemClassname == "") || {!(_this call FUNC(canAttach))}) exitWith {ERROR("Tried to attach, but check failed");}; diff --git a/addons/attach/functions/fnc_canAttach.sqf b/addons/attach/functions/fnc_canAttach.sqf index ff95186afe..20a49c09be 100644 --- a/addons/attach/functions/fnc_canAttach.sqf +++ b/addons/attach/functions/fnc_canAttach.sqf @@ -19,11 +19,12 @@ private ["_attachLimit", "_attachedObjects","_playerPos"]; params ["_attachToVehicle","_player","_args"]; -_args params [["_itemname",""]]; +_args params [["_itemClassname","", [""]]]; +TRACE_3("params",_attachToVehicle,_unit,_itemClassname); _attachLimit = [6, 1] select (_player == _attachToVehicle); _attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []]; _playerPos = (ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot")); -(canStand _player) && {(_attachToVehicle distance _player) < 7} && {alive _attachToVehicle} && {(count _attachedObjects) < _attachLimit} && {_itemName in ((itemsWithMagazines _player) + [""])}; +(canStand _player) && {(_attachToVehicle distance _player) < 7} && {alive _attachToVehicle} && {(count _attachedObjects) < _attachLimit} && {_itemClassname in ((itemsWithMagazines _player) + [""])}; diff --git a/addons/attach/functions/fnc_canDetach.sqf b/addons/attach/functions/fnc_canDetach.sqf index d749b81317..ba3182ddea 100644 --- a/addons/attach/functions/fnc_canDetach.sqf +++ b/addons/attach/functions/fnc_canDetach.sqf @@ -18,6 +18,7 @@ private ["_attachedObjects", "_inRange"]; params ["_attachToVehicle", "_unit"]; +TRACE_2("params",_attachToVehicle,_unit); _attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []]; diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index 1f286453e5..98f482f17b 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -21,6 +21,8 @@ private ["_attachedObjects", "_attachedItems", "_itemDisplayName", "_unitPos", "_objectPos" ]; params ["_attachToVehicle","_unit"], +TRACE_2("params",_attachToVehicle,_unit); + _attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []]; _attachedItems = _attachToVehicle getVariable [QGVAR(ItemNames), []]; diff --git a/addons/attach/functions/fnc_getChildrenAttachActions.sqf b/addons/attach/functions/fnc_getChildrenAttachActions.sqf index 0fe9a087ab..c44c074f90 100644 --- a/addons/attach/functions/fnc_getChildrenAttachActions.sqf +++ b/addons/attach/functions/fnc_getChildrenAttachActions.sqf @@ -19,6 +19,7 @@ private ["_listed", "_actions", "_item", "_displayName", "_picture", "_action"]; params ["_target","_player"]; +TRACE_2("params",_target,_player); _listed = []; _actions = []; diff --git a/addons/attach/functions/fnc_placeApprove.sqf b/addons/attach/functions/fnc_placeApprove.sqf index 50bb7b0363..0656e7880f 100644 --- a/addons/attach/functions/fnc_placeApprove.sqf +++ b/addons/attach/functions/fnc_placeApprove.sqf @@ -28,6 +28,8 @@ private ["_startingOffset", "_startDistanceFromCenter", "_closeInUnitVector", "_closeInMax", "_closeInMin", "_closeInDistance", "_endPosTestOffset", "_endPosTest", "_doesIntersect", "_startingPosShifted", "_startASL", "_endPosShifted", "_endASL", "_attachedObject", "_currentObjects", "_currentItemNames"]; params ["_unit", "_attachToVehicle", "_itemClassname", "_itemVehClass", "_onAtachText", "_startingPosition"]; +TRACE_6("params",_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_startingPosition); + _startingOffset = _attachToVehicle worldToModel _startingPosition; _startDistanceFromCenter = vectorMagnitude _startingOffset;