Merge pull request #1977 from acemod/attachClickCooldown

Mouse cooldown for click to interact option
This commit is contained in:
PabstMirror 2015-08-08 11:18:20 -05:00
commit 8e905af444
6 changed files with 13 additions and 9 deletions

View File

@ -31,7 +31,7 @@ _actions = [];
if (getText (_item >> "ACE_Attachable") != "") then {
_displayName = getText(_item >> "displayName");
_picture = getText(_item >> "picture");
_action = [_x, _displayName, _picture, {_this call FUNC(attach)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
_actions pushBack [_action, [], _target];
};
};
@ -44,7 +44,7 @@ _actions = [];
if (getText (_item >> "ACE_Attachable") != "") then {
_displayName = getText(_item >> "displayName");
_picture = getText(_item >> "picture");
_action = [_x, _displayName, _picture, {_this call FUNC(attach)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction);
_actions pushBack [_action, [], _target];
};
};

View File

@ -123,7 +123,8 @@ class CfgVehicles {
displayName = "$STR_ACE_ROLLWIRE";
distance = 4;
condition = "true";
statement = QUOTE([ARR_2(_target,_player)] call FUNC(deploy));
//wait a frame to handle "Do When releasing action menu key" option:
statement = QUOTE([ARR_2({_this call FUNC(deploy)}, [ARR_2(_target,_player)])] call EFUNC(common,execNextFrame));
showDisabled = 0;
exceptions[] = {};
priority = 5;

View File

@ -37,7 +37,7 @@ deleteVehicle _wirecoil;
_unit setVariable [QGVAR(wireDeployed), false];
GVAR(deployPFH) = [{
EXPLODE_4_PVT(_this select 0,_wireNoGeo,_wireNoGeoPos,_unit,_action);
EXPLODE_3_PVT(_this select 0,_wireNoGeo,_wireNoGeoPos,_unit);
private ["_range", "_posStart", "_posEnd", "_dirVect", "_dir", "_anim", "_wire"];
_posStart = (_wireNoGeo modelToWorldVisual (_wireNoGeo selectionPosition "start")) call EFUNC(common,positionToASL);
@ -73,7 +73,7 @@ GVAR(deployPFH) = [{
{
_wireNoGeo animate [_x, _anim];
} foreach WIRE_FAST;
}, 0, [_wireNoGeo, _wireNoGeoPos, _unit, _action]] call CBA_fnc_addPerFrameHandler;
}, 0, [_wireNoGeo, _wireNoGeoPos, _unit]] call CBA_fnc_addPerFrameHandler;
[localize "STR_ACE_ROLLWIRE", "", ""] call EFUNC(interaction,showMouseHint);

View File

@ -5,7 +5,8 @@ class CfgVehicles {
class ACE_Sandbags {
displayName = CSTRING(DeploySandbag);
condition = QUOTE(call FUNC(canDeploy));
statement = QUOTE(call FUNC(deploy));
//wait a frame to handle "Do When releasing action menu key" option:
statement = QUOTE([ARR_2({_this call FUNC(deploy)}, [])] call EFUNC(common,execNextFrame));
exceptions[] = {"isNotSwimming"};
showDisabled = 1;
priority = 4;

View File

@ -82,7 +82,8 @@ class CfgVehicles {
displayName = CSTRING(Position);
distance = 4;
condition = "true";
statement = QUOTE([ARR_2(_target,_player)] call FUNC(positionTL));
//wait a frame to handle "Do When releasing action menu key" option:
statement = QUOTE([ARR_2({_this call FUNC(positionTL)}, [ARR_2(_target,_player)])] call EFUNC(common,execNextFrame));
showDisabled = 0;
exceptions[] = {};
priority = 5;

View File

@ -17,7 +17,7 @@ class CfgVehicles {
class Item_Base_F;
class ACE_Item_Tripod: Item_Base_F {
author[] = {"Rocko", "Scubaman3D"};
author[] = {"Rocko", "Scubaman3D"};
scope = 2;
scopeCurator = 2;
displayName = CSTRING(DisplayName);
@ -76,7 +76,8 @@ class CfgVehicles {
displayName = CSTRING(Adjust);
distance = 5;
condition = "true";
statement = QUOTE(_target call FUNC(adjust));
//wait a frame to handle "Do When releasing action menu key" option:
statement = QUOTE([ARR_2({_this call FUNC(adjust)}, [_target])] call EFUNC(common,execNextFrame));
showDisabled = 0;
exceptions[] = {};
priority = 5;