From 7519fefee9cee050665240ad0f8241220153b9fc Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 30 Jan 2015 16:11:16 -0600 Subject: [PATCH] Fix Interaction --- addons/attach/CfgVehicles.hpp | 13 +++++++------ addons/attach/functions/fnc_attach.sqf | 2 +- addons/attach/functions/fnc_detach.sqf | 5 +++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/addons/attach/CfgVehicles.hpp b/addons/attach/CfgVehicles.hpp index 8a231d3679..473b67fcc5 100644 --- a/addons/attach/CfgVehicles.hpp +++ b/addons/attach/CfgVehicles.hpp @@ -7,22 +7,23 @@ class ACE_Actions { \ class GVAR(AttachVehicle) { \ displayName = "$STR_ACE_Attach_AttachDetach"; \ - condition = QUOTE( [ARR_3(_player, _target, '')] call FUNC(canAttach) ); \ - statement = QUOTE( [ARR_2(_player, _target)] call FUNC(openAttachUI); ); \ + condition = QUOTE(([ARR_3(_player, _target, '')] call FUNC(canAttach))); \ + statement = QUOTE( [ARR_2(_player, _target)] call FUNC(openAttachUI);); \ exceptions[] = {"ACE_Drag_isNotDragging"}; \ showDisabled = 0; \ priority = 0; \ icon = PATHTOF(UI\attach_ca.paa); \ - hotkey = "T"; \ + distance = 4; \ }; \ class GVAR(DetachVehicle) { \ displayName = "$STR_ACE_Attach_Detach"; \ - condition = QUOTE( [ARR_2(_player, _target)] call FUNC(canDetach) ); \ + condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canDetach))); \ statement = QUOTE( [ARR_2(_player, _target)] call FUNC(detach) ); \ exceptions[] = {"ACE_Drag_isNotDragging"}; \ showDisabled = 0; \ priority = 0; \ icon = PATHTOF(UI\detach_ca.paa); \ + distance = 4; \ }; \ }; @@ -52,7 +53,7 @@ class CfgVehicles { class ACE_Equipment { class GVAR(Attach) { displayName = "$STR_ACE_Attach_AttachDetach"; - condition = QUOTE( [ARR_3(_player, _player, '')] call FUNC(canAttach) ); + condition = QUOTE(([ARR_3(_player, _player, '')] call FUNC(canAttach))); statement = QUOTE( [ARR_2(_player, _player)] call FUNC(openAttachUI); ); exceptions[] = {"ACE_Drag_isNotDragging"}; showDisabled = 0; @@ -62,7 +63,7 @@ class CfgVehicles { }; class GVAR(Detach) { displayName = "$STR_ACE_Attach_Detach"; - condition = QUOTE( [ARR_2(_player, _player)] call FUNC(canDetach) ); + condition = QUOTE(([ARR_2(_player, _player)] call FUNC(canDetach))); statement = QUOTE( [ARR_2(_player, _player)] call FUNC(detach) ); exceptions[] = {"ACE_Drag_isNotDragging"}; showDisabled = 0; diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index 2619f8ac98..3b99462338 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -78,7 +78,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment }] call BIS_fnc_addStackedEventHandler; //had to spawn the mouseHint, not sure why - [localize "STR_ACE_Attach_PlaceAction", localize "STR_ACE_Attach_CancelAction"] call EFUNC(interaction,showMouseHint); + [localize "STR_ACE_Attach_PlaceAction", localize "STR_ACE_Attach_CancelAction"] spawn EFUNC(interaction,showMouseHint); _unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {GVAR(pfeh_running) AND !isNull (GVAR(setupObject))}, {call FUNC(placeApprove);}] call EFUNC(common,AddActionEventHandler)]; _unit setVariable [QGVAR(cancelActionEH), [_unit, "MenuBack", {GVAR(pfeh_running) AND !isNull (GVAR(setupObject))}, {call FUNC(placeCancel);}] call EFUNC(common,AddActionEventHandler)]; }; diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index d9ade6e4d0..7f982654b5 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -6,7 +6,8 @@ Author: eRazeri and CAA-Picard Detach an item from a unit Arguments: -unit +0: OBJECT - unit doing the attaching (player) +1: OBJECT - vehicle that it will be detached from (player or vehicle) Return Value: none @@ -14,7 +15,7 @@ none private ["_itemName", "_count", "_attachedItem", "_fnc_detachDelay"]; -PARAMS_2(_unit, _attachToVehicle); +PARAMS_2(_unit,_attachToVehicle); _attachedObjectsArray = _attachToVehicle getVariable ["ACE_AttachedObjects", []]; _attachedItemsArray = _attachToVehicle getVariable ["ACE_AttachedItemNames", []];