diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index 6738b3e8c8..b9c9840cfc 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -17,10 +17,9 @@ */ #include "script_component.hpp" -private ["_itemClassname", "_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID", "_model"]; - -PARAMS_3(_attachToVehicle,_unit,_args); -_itemClassname = [_args, 0, ""] call CBA_fnc_defaultParam; +private ["_itemVehClass", "_onAtachText", "_selfAttachPosition", "_attachedItem", "_tempObject", "_actionID", "_model"]; +params ["_attachToVehicle","_unit","_args"]; +_args params [["_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");}; @@ -69,9 +68,8 @@ if (_unit == _attachToVehicle) then { //Self Attachment [{ private["_angle", "_dir", "_screenPos", "_realDistance", "_up", "_virtualPos", "_virtualPosASL", "_lineInterection"]; - - PARAMS_2(_args,_pfID); - EXPLODE_6_PVT(_args,_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_actionID); + params ["_args","_idPFH"]; + _args params ["_unit","_attachToVehicle","_itemClassname","_itemVehClass","_onAtachText","_actionID"]; _virtualPosASL = (eyePos _unit) vectorAdd (positionCameraToWorld [0,0,0.6]) vectorDiff (positionCameraToWorld [0,0,0]); if (cameraView == "EXTERNAL") then { @@ -88,7 +86,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment {!([_unit, _attachToVehicle, []] call EFUNC(common,canInteractWith))} || {!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) then { - [_pfID] call CBA_fnc_removePerFrameHandler; + [_idPFH] call CBA_fnc_removePerFrameHandler; [_unit, QGVAR(vehAttach), false] call EFUNC(common,setForceWalkStatus); [] call EFUNC(interaction,hideMouseHint); [_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler); diff --git a/addons/attach/functions/fnc_canAttach.sqf b/addons/attach/functions/fnc_canAttach.sqf index 18071092d5..ff95186afe 100644 --- a/addons/attach/functions/fnc_canAttach.sqf +++ b/addons/attach/functions/fnc_canAttach.sqf @@ -17,11 +17,10 @@ */ #include "script_component.hpp" -PARAMS_3(_attachToVehicle,_player,_args); +private ["_attachLimit", "_attachedObjects","_playerPos"]; +params ["_attachToVehicle","_player","_args"]; +_args params [["_itemname",""]]; -private ["_itemName", "_attachLimit", "_attachedObjects","_playerPos"]; - -_itemName = [_args, 0, ""] call CBA_fnc_defaultParam; _attachLimit = [6, 1] select (_player == _attachToVehicle); _attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []]; diff --git a/addons/attach/functions/fnc_canDetach.sqf b/addons/attach/functions/fnc_canDetach.sqf index dc335e6bb6..d749b81317 100644 --- a/addons/attach/functions/fnc_canDetach.sqf +++ b/addons/attach/functions/fnc_canDetach.sqf @@ -16,9 +16,8 @@ */ #include "script_component.hpp" -PARAMS_2(_attachToVehicle,_unit); - private ["_attachedObjects", "_inRange"]; +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 92df83b5c1..1f286453e5 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -16,15 +16,14 @@ */ #include "script_component.hpp" -PARAMS_2(_attachToVehicle,_unit); - -private ["_attachedObjects", "_attachedItems", "_itemDisplayName"]; - +private ["_attachedObjects", "_attachedItems", "_itemDisplayName", + "_attachedObject", "_attachedIndex", "_itemName", "_minDistance", + "_unitPos", "_objectPos" +]; +params ["_attachToVehicle","_unit"], _attachedObjects = _attachToVehicle getVariable [QGVAR(Objects), []]; _attachedItems = _attachToVehicle getVariable [QGVAR(ItemNames), []]; -private ["_attachedObject", "_attachedIndex", "_itemName", "_minDistance", "_unitPos", "_objectPos"]; - _attachedObject = objNull; _attachedIndex = -1; _itemName = ""; diff --git a/addons/attach/functions/fnc_getChildrenAttachActions.sqf b/addons/attach/functions/fnc_getChildrenAttachActions.sqf index fb432146be..0fe9a087ab 100644 --- a/addons/attach/functions/fnc_getChildrenAttachActions.sqf +++ b/addons/attach/functions/fnc_getChildrenAttachActions.sqf @@ -18,7 +18,7 @@ #include "script_component.hpp" private ["_listed", "_actions", "_item", "_displayName", "_picture", "_action"]; -PARAMS_2(_target,_player); +params ["_target","_player"]; _listed = []; _actions = []; diff --git a/addons/attach/functions/fnc_placeApprove.sqf b/addons/attach/functions/fnc_placeApprove.sqf index efd85769d0..50bb7b0363 100644 --- a/addons/attach/functions/fnc_placeApprove.sqf +++ b/addons/attach/functions/fnc_placeApprove.sqf @@ -27,8 +27,7 @@ private ["_startingOffset", "_startDistanceFromCenter", "_closeInUnitVector", "_closeInMax", "_closeInMin", "_closeInDistance", "_endPosTestOffset", "_endPosTest", "_doesIntersect", "_startingPosShifted", "_startASL", "_endPosShifted", "_endASL", "_attachedObject", "_currentObjects", "_currentItemNames"]; -PARAMS_6(_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAtachText,_startingPosition); - +params ["_unit", "_attachToVehicle", "_itemClassname", "_itemVehClass", "_onAtachText", "_startingPosition"]; _startingOffset = _attachToVehicle worldToModel _startingPosition; _startDistanceFromCenter = vectorMagnitude _startingOffset;