From 36b61fdb6efd4196c0fdab69650fd72aea587d59 Mon Sep 17 00:00:00 2001 From: Dystopian Date: Thu, 7 Dec 2017 20:26:21 +0300 Subject: [PATCH] Block adv. throwing when player is busy (#5534) * Add throw blocking status effect * Add concertina_wire and tripod support * Add launcher in hands support * Disable effect sending more than once * Fix EFUNC using, add trace * Disable vanilla throw blocking * Improve status handling * Fix rearm status key --- .../functions/fnc_canPrepare.sqf | 4 +++- addons/attach/functions/fnc_attach.sqf | 2 ++ addons/common/XEH_postInit.sqf | 5 +++-- addons/common/functions/fnc_statusEffect_set.sqf | 15 +++++++++------ addons/concertina_wire/functions/fnc_deploy.sqf | 3 +++ addons/dragging/functions/fnc_dropObject.sqf | 2 ++ .../dragging/functions/fnc_dropObject_carry.sqf | 1 + addons/dragging/functions/fnc_startCarry.sqf | 2 ++ addons/dragging/functions/fnc_startDrag.sqf | 2 ++ .../explosives/functions/fnc_setupExplosive.sqf | 2 ++ addons/rearm/functions/fnc_dropAmmo.sqf | 3 ++- addons/rearm/functions/fnc_grabAmmo.sqf | 3 ++- addons/rearm/functions/fnc_takeSuccess.sqf | 3 ++- .../functions/fnc_startNozzleInHandsPFH.sqf | 1 + addons/refuel/functions/fnc_takeNozzle.sqf | 1 + addons/sandbag/functions/fnc_deploy.sqf | 1 + addons/sandbag/functions/fnc_deployCancel.sqf | 1 + addons/sandbag/functions/fnc_deployConfirm.sqf | 1 + .../functions/fnc_cancelTLdeploy.sqf | 1 + .../functions/fnc_confirmTLdeploy.sqf | 1 + .../tacticalladder/functions/fnc_positionTL.sqf | 1 + addons/trenches/functions/fnc_placeCancel.sqf | 1 + addons/trenches/functions/fnc_placeConfirm.sqf | 1 + addons/trenches/functions/fnc_placeTrench.sqf | 1 + addons/tripod/functions/fnc_adjust.sqf | 2 ++ 25 files changed, 48 insertions(+), 12 deletions(-) diff --git a/addons/advanced_throwing/functions/fnc_canPrepare.sqf b/addons/advanced_throwing/functions/fnc_canPrepare.sqf index ba3fc53796..c95ec39c49 100644 --- a/addons/advanced_throwing/functions/fnc_canPrepare.sqf +++ b/addons/advanced_throwing/functions/fnc_canPrepare.sqf @@ -33,4 +33,6 @@ GVAR(enabled) && {!(call EFUNC(common,isFeatureCameraActive))} && {[_unit, objNull, ["isNotInside", "isNotSwimming", "isNotSitting"/*, "isNotOnLadder"*/]] call EFUNC(common,canInteractWith)} && // Ladder needs positioning fixes on throw -{_unit call CBA_fnc_canUseWeapon} // Disable in non-FFV seats due to surface detection issues +{_unit call CBA_fnc_canUseWeapon} && // Disable in non-FFV seats due to surface detection issues +{"" == currentWeapon _unit || {currentWeapon _unit != secondaryWeapon _unit}} && +{0 >= _unit getVariable [QEGVAR(common,effect_blockThrow), 0]} diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index d91102ee5f..c332e0fab1 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -48,6 +48,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment GVAR(placeAction) = PLACE_WAITING; [_unit, "forceWalk", "ACE_Attach", true] call EFUNC(common,statusEffect_set); + [_unit, "blockThrow", "ACE_Attach", true] call EFUNC(common,statusEffect_set); [{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call CBA_fnc_execNextFrame; _unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)]; @@ -85,6 +86,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment [_idPFH] call CBA_fnc_removePerFrameHandler; [_unit, "forceWalk", "ACE_Attach", false] call EFUNC(common,statusEffect_set); + [_unit, "blockThrow", "ACE_Attach", false] call EFUNC(common,statusEffect_set); [] call EFUNC(interaction,hideMouseHint); [_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler); _unit removeAction _actionID; diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 0bd088a210..9898c50ef3 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -19,11 +19,12 @@ //Status Effect EHs: [QGVAR(setStatusEffect), {_this call FUNC(statusEffect_set)}] call CBA_fnc_addEventHandler; -["forceWalk", false, ["ACE_SwitchUnits", "ACE_Attach", "ACE_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_Sandbag", "ACE_refuel", "ACE_rearm", "ACE_dragging"]] call FUNC(statusEffect_addType); +["forceWalk", false, ["ACE_SwitchUnits", "ACE_Attach", "ACE_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_Sandbag", "ACE_refuel", "ACE_rearm", "ACE_Trenches"]] call FUNC(statusEffect_addType); ["blockSprint", false, []] call FUNC(statusEffect_addType); ["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), "ace_unconscious"]] call FUNC(statusEffect_addType); ["blockDamage", false, ["fixCollision", "ACE_cargo"]] call FUNC(statusEffect_addType); ["blockEngine", false, ["ACE_Refuel"]] call FUNC(statusEffect_addType); +["blockThrow", false, ["ACE_Attach", "ACE_concertina_wire", "ACE_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_rearm", "ACE_refuel", "ACE_Sandbag", "ACE_Trenches", "ACE_tripod"]] call FUNC(statusEffect_addType); [QGVAR(forceWalk), { params ["_object", "_set"]; @@ -44,7 +45,7 @@ params ["_object", "_set"]; if ((_object isKindOf "CAManBase") && {(["ace_medical"] call FUNC(isModLoaded))}) then { TRACE_2("blockDamage EH (using medical)",_object,_set); - _object setvariable [QEGVAR(medical,allowDamage), (_set == 0), true]; + _object setVariable [QEGVAR(medical,allowDamage), (_set == 0), true]; } else { TRACE_2("blockDamage EH (using allowDamage)",_object,_set); _object allowDamage (_set == 0); diff --git a/addons/common/functions/fnc_statusEffect_set.sqf b/addons/common/functions/fnc_statusEffect_set.sqf index 4908da5395..27824cfe2e 100644 --- a/addons/common/functions/fnc_statusEffect_set.sqf +++ b/addons/common/functions/fnc_statusEffect_set.sqf @@ -16,7 +16,6 @@ * * Public: Yes */ -// #define DEBUG_MODE_FULL #include "script_component.hpp" params [["_object", objNull, [objNull]], ["_effectName", "", [""]], ["_ID", "", [""]], ["_set", true, [false]]]; @@ -32,7 +31,7 @@ if (isNull _object) exitWith {TRACE_1("null",_object);}; [_object, true] call FUNC(statusEffect_resetVariables); //Check for mismatch, and set object ref -//check ID case and set globaly if not already set: +//check ID case and set globally if not already set: _ID = toLower _ID; private _statusReasons = missionNamespace getVariable [(format [QGVAR(statusEffects_%1), _effectName]), []]; private _statusIndex = _statusReasons find _ID; @@ -62,9 +61,13 @@ if (_set isEqualTo (_effectBoolArray select _statusIndex)) exitWith { TRACE_2("Setting to new value",_set,_effectBoolArray select _statusIndex); _effectBoolArray set [_statusIndex, _set]; -_effectNumber = _effectBoolArray call FUNC(toBitmask); //Convert array back to number +private _newEffectNumber = _effectBoolArray call FUNC(toBitmask); //Convert array back to number -TRACE_2("Saving globaly",_effectVarName,_effectNumber); -_object setVariable [_effectVarName, _effectNumber, true]; +TRACE_2("Saving globally",_effectVarName,_newEffectNumber); +_object setVariable [_effectVarName, _newEffectNumber, true]; -[_object, _effectName] call FUNC(statusEffect_sendEffects); +if (_effectNumber == 0 || {_newEffectNumber == 0}) then { + [_object, _effectName] call FUNC(statusEffect_sendEffects); +} else { + LOG("not sending more than once"); +}; diff --git a/addons/concertina_wire/functions/fnc_deploy.sqf b/addons/concertina_wire/functions/fnc_deploy.sqf index 6dc05b365d..6782f64342 100644 --- a/addons/concertina_wire/functions/fnc_deploy.sqf +++ b/addons/concertina_wire/functions/fnc_deploy.sqf @@ -65,6 +65,7 @@ GVAR(deployPFH) = [{ }, 0, [_wireNoGeo, _wire, _anim, _dir, _wireNoGeoPos]] call CBA_fnc_addPerFrameHandler; [_unit, "DefaultAction", _unit getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler); + [_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); call EFUNC(interaction,hideMouseHint); [_idPFH] call CBA_fnc_removePerFrameHandler; @@ -78,6 +79,8 @@ GVAR(deployPFH) = [{ [localize "STR_ACE_ROLLWIRE", "", ""] call EFUNC(interaction,showMouseHint); +[_unit, "blockThrow", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); + GVAR(placer) setVariable [QGVAR(Deploy), [GVAR(placer), "DefaultAction", {GVAR(deployPFH) != -1}, diff --git a/addons/dragging/functions/fnc_dropObject.sqf b/addons/dragging/functions/fnc_dropObject.sqf index 007f54adef..6553c84929 100644 --- a/addons/dragging/functions/fnc_dropObject.sqf +++ b/addons/dragging/functions/fnc_dropObject.sqf @@ -46,6 +46,8 @@ if (_target isKindOf "CAManBase") then { _unit removeWeapon "ACE_FakePrimaryWeapon"; +[_unit, "blockThrow", "ACE_dragging", false] call EFUNC(common,statusEffect_set); + // prevent object from flipping inside buildings if (_inBuilding) then { _target setPosASL (getPosASL _target vectorAdd [0, 0, 0.05]); diff --git a/addons/dragging/functions/fnc_dropObject_carry.sqf b/addons/dragging/functions/fnc_dropObject_carry.sqf index c3521bbed0..857e64bb7a 100644 --- a/addons/dragging/functions/fnc_dropObject_carry.sqf +++ b/addons/dragging/functions/fnc_dropObject_carry.sqf @@ -51,6 +51,7 @@ _unit removeWeapon "ACE_FakePrimaryWeapon"; _unit selectWeapon primaryWeapon _unit; [_unit, "forceWalk", "ACE_dragging", false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_dragging", false] call EFUNC(common,statusEffect_set); // prevent object from flipping inside buildings if (_inBuilding) then { diff --git a/addons/dragging/functions/fnc_startCarry.sqf b/addons/dragging/functions/fnc_startCarry.sqf index 7a5341b8a8..1a53a06994 100644 --- a/addons/dragging/functions/fnc_startCarry.sqf +++ b/addons/dragging/functions/fnc_startCarry.sqf @@ -58,6 +58,8 @@ if (_target isKindOf "CAManBase") then { }; +[_unit, "blockThrow", "ACE_dragging", true] call EFUNC(common,statusEffect_set); + // prevent multiple players from accessing the same object [_unit, _target, true] call EFUNC(common,claim); diff --git a/addons/dragging/functions/fnc_startDrag.sqf b/addons/dragging/functions/fnc_startDrag.sqf index 378128862a..8cf552e3d1 100644 --- a/addons/dragging/functions/fnc_startDrag.sqf +++ b/addons/dragging/functions/fnc_startDrag.sqf @@ -35,6 +35,8 @@ if (primaryWeapon _unit == "") then { // select primary, otherwise the drag animation actions don't work. _unit selectWeapon primaryWeapon _unit; +[_unit, "blockThrow", "ACE_dragging", true] call EFUNC(common,statusEffect_set); + // prevent multiple players from accessing the same object [_unit, _target, true] call EFUNC(common,claim); diff --git a/addons/explosives/functions/fnc_setupExplosive.sqf b/addons/explosives/functions/fnc_setupExplosive.sqf index 33d304609e..6e356a6f8d 100644 --- a/addons/explosives/functions/fnc_setupExplosive.sqf +++ b/addons/explosives/functions/fnc_setupExplosive.sqf @@ -31,6 +31,7 @@ private _p3dModel = getText (configFile >> "CfgVehicles" >> _setupObjectClass >> if (_p3dModel == "") exitWith {ERROR("No Model");}; //"" - will crash game! [_unit, "forceWalk", "ACE_Explosives", true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Explosives", true] call EFUNC(common,statusEffect_set); //Show mouse buttons: [localize LSTRING(PlaceAction), localize LSTRING(CancelAction), localize LSTRING(ScrollAction)] call EFUNC(interaction,showMouseHint); @@ -149,6 +150,7 @@ GVAR(TweakedAngle) = 0; GVAR(pfeh_running) = false; [_unit, "forceWalk", "ACE_Explosives", false] call EFUNC(common,statusEffect_set); + [_unit, "blockThrow", "ACE_Explosives", false] call EFUNC(common,statusEffect_set); [] call EFUNC(interaction,hideMouseHint); [_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler); [_unit, "zoomtemp", (_unit getVariable [QGVAR(cancelActionEH), -1])] call EFUNC(common,removeActionEventHandler); diff --git a/addons/rearm/functions/fnc_dropAmmo.sqf b/addons/rearm/functions/fnc_dropAmmo.sqf index 61e744fcf5..30b8b9d67d 100644 --- a/addons/rearm/functions/fnc_dropAmmo.sqf +++ b/addons/rearm/functions/fnc_dropAmmo.sqf @@ -38,7 +38,8 @@ if (_actionID != -1) then { _unit removeAction _actionID; _unit setVariable [QGVAR(ReleaseActionID), nil]; }; -[_unit, "forceWalk", QGVAR(vehRearm), false] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", "ACE_rearm", false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_rearm", false] call EFUNC(common,statusEffect_set); if (_unholster) then { REARM_UNHOLSTER_WEAPON diff --git a/addons/rearm/functions/fnc_grabAmmo.sqf b/addons/rearm/functions/fnc_grabAmmo.sqf index 105141feda..13159987f2 100644 --- a/addons/rearm/functions/fnc_grabAmmo.sqf +++ b/addons/rearm/functions/fnc_grabAmmo.sqf @@ -19,7 +19,8 @@ params ["_dummy", "_unit"]; REARM_HOLSTER_WEAPON; -[_unit, "forceWalk", QGVAR(vehRearm), true] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", "ACE_rearm", true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_rearm", true] call EFUNC(common,statusEffect_set); [ TIME_PROGRESSBAR(5), diff --git a/addons/rearm/functions/fnc_takeSuccess.sqf b/addons/rearm/functions/fnc_takeSuccess.sqf index e9d8b1daaa..9e6be0fe1c 100644 --- a/addons/rearm/functions/fnc_takeSuccess.sqf +++ b/addons/rearm/functions/fnc_takeSuccess.sqf @@ -28,7 +28,8 @@ if (GVAR(supply) > 0) then { }; if !(_success) exitWith {WARNING_2("takeSuccess failed to take [%1] from [%2]",_magazineClass,_truck);}; -[_unit, "forceWalk", QGVAR(vehRearm), true] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", "ACE_rearm", true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_rearm", true] call EFUNC(common,statusEffect_set); private _dummy = [_unit, _magazineClass] call FUNC(createDummy); [_dummy, _unit] call FUNC(pickUpAmmo); diff --git a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf index fca638fc25..95c853a217 100644 --- a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf +++ b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf @@ -24,6 +24,7 @@ _unit setVariable [QGVAR(hint), nil]; \ call EFUNC(interaction,hideMouseHint); \ [_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set); \ + [_unit, "blockThrow", "ACE_refuel", false] call EFUNC(common,statusEffect_set); \ [_idPFH] call CBA_fnc_removePerFrameHandler; params ["_unit", "_nozzle"]; diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index 1c2382c21c..5049adfee6 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -88,6 +88,7 @@ params [ _unit action ["SwitchWeapon", _unit, _unit, 299]; [_unit, "forceWalk", "ACE_refuel", true] call EFUNC(common,statusEffect_set); + [_unit, "blockThrow", "ACE_refuel", true] call EFUNC(common,statusEffect_set); [_unit, _nozzle] call FUNC(startNozzleInHandsPFH); }, diff --git a/addons/sandbag/functions/fnc_deploy.sqf b/addons/sandbag/functions/fnc_deploy.sqf index af7d5c0a2f..da22483835 100644 --- a/addons/sandbag/functions/fnc_deploy.sqf +++ b/addons/sandbag/functions/fnc_deploy.sqf @@ -19,6 +19,7 @@ params ["_unit"]; // prevent the placing unit from running [_unit, "forceWalk", "ACE_Sandbag", true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Sandbag", true] call EFUNC(common,statusEffect_set); // create the sandbag private _sandBag = createVehicle ["ACE_SandbagObject_NoGeo", [0, 0, 0], [], 0, "NONE"]; diff --git a/addons/sandbag/functions/fnc_deployCancel.sqf b/addons/sandbag/functions/fnc_deployCancel.sqf index 6cb38e4f73..bd5e1a0d86 100644 --- a/addons/sandbag/functions/fnc_deployCancel.sqf +++ b/addons/sandbag/functions/fnc_deployCancel.sqf @@ -22,6 +22,7 @@ if (_key != 1 || {GVAR(deployPFH) == -1}) exitWith {}; // enable running again [_unit, "forceWalk", "ACE_Sandbag", false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Sandbag", false] call EFUNC(common,statusEffect_set); // delete placement dummy deleteVehicle GVAR(sandBag); diff --git a/addons/sandbag/functions/fnc_deployConfirm.sqf b/addons/sandbag/functions/fnc_deployConfirm.sqf index 68328cca67..29fca46f54 100644 --- a/addons/sandbag/functions/fnc_deployConfirm.sqf +++ b/addons/sandbag/functions/fnc_deployConfirm.sqf @@ -19,6 +19,7 @@ params ["_unit"]; // enable running again [_unit, "forceWalk", "ACE_Sandbag", false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Sandbag", false] call EFUNC(common,statusEffect_set); // remove sandbag from inventory _unit removeItem "ACE_Sandbag_empty"; diff --git a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf index f66dd79a25..098429bcec 100644 --- a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf +++ b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf @@ -24,6 +24,7 @@ if (_key != 1 || {isNull GVAR(ladder)}) exitWith {}; // enable running again [_unit, "forceWalk", "ACE_Ladder", false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Ladder", false] call EFUNC(common,statusEffect_set); detach GVAR(ladder); diff --git a/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf index 1eb47abf48..9f1c5c14bb 100644 --- a/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf +++ b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf @@ -20,6 +20,7 @@ params ["_unit", "_ladder"]; // enable running again [_unit, "forceWalk", "ACE_Ladder", false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Ladder", false] call EFUNC(common,statusEffect_set); private _pos1 = getPosASL _ladder; private _pos2 = AGLToASL (_ladder modelToWorld (_ladder selectionPosition "check2")); diff --git a/addons/tacticalladder/functions/fnc_positionTL.sqf b/addons/tacticalladder/functions/fnc_positionTL.sqf index c47733dd5a..a52211884c 100644 --- a/addons/tacticalladder/functions/fnc_positionTL.sqf +++ b/addons/tacticalladder/functions/fnc_positionTL.sqf @@ -22,6 +22,7 @@ params ["_unit", "_ladder"]; // prevent the placing unit from running [_unit, "forceWalk", "ACE_Ladder", true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Ladder", true] call EFUNC(common,statusEffect_set); { _ladder animate [_x, 0]; diff --git a/addons/trenches/functions/fnc_placeCancel.sqf b/addons/trenches/functions/fnc_placeCancel.sqf index b3d6bf78da..1eaf7298a1 100644 --- a/addons/trenches/functions/fnc_placeCancel.sqf +++ b/addons/trenches/functions/fnc_placeCancel.sqf @@ -22,6 +22,7 @@ if (_key != 1 || {GVAR(digPFH) == -1}) exitWith {}; // enable running again [_unit, "forceWalk", "ACE_Trenches", false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Trenches", false] call EFUNC(common,statusEffect_set); // delete placement dummy deleteVehicle GVAR(trench); diff --git a/addons/trenches/functions/fnc_placeConfirm.sqf b/addons/trenches/functions/fnc_placeConfirm.sqf index 7e5e94de8d..08c774d8c9 100644 --- a/addons/trenches/functions/fnc_placeConfirm.sqf +++ b/addons/trenches/functions/fnc_placeConfirm.sqf @@ -19,6 +19,7 @@ params ["_unit"]; // enable running again [_unit, "forceWalk", "ACE_Trenches", false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Trenches", false] call EFUNC(common,statusEffect_set); // remove dig pfh [GVAR(digPFH)] call CBA_fnc_removePerFrameHandler; diff --git a/addons/trenches/functions/fnc_placeTrench.sqf b/addons/trenches/functions/fnc_placeTrench.sqf index 6a9e29d767..94826fb346 100644 --- a/addons/trenches/functions/fnc_placeTrench.sqf +++ b/addons/trenches/functions/fnc_placeTrench.sqf @@ -28,6 +28,7 @@ TRACE_1("",GVAR(trenchPlacementData)); // prevent the placing unit from running [_unit, "forceWalk", "ACE_Trenches", true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Trenches", true] call EFUNC(common,statusEffect_set); // create the trench private _trench = createVehicle [_noGeoModel, [0, 0, 0], [], 0, "NONE"]; diff --git a/addons/tripod/functions/fnc_adjust.sqf b/addons/tripod/functions/fnc_adjust.sqf index b12f713ace..b81f9fa961 100644 --- a/addons/tripod/functions/fnc_adjust.sqf +++ b/addons/tripod/functions/fnc_adjust.sqf @@ -25,6 +25,7 @@ GVAR(adjustPFH) = [{ if (!(_unit getVariable [QGVAR(adjusting), false]) || {isNull _tripod} || {_unit distance _tripod > 5}) exitWith { call EFUNC(interaction,hideMouseHint); + [_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); [_unit, "DefaultAction", _unit getVariable [QGVAR(Adjust), -1]] call EFUNC(common,removeActionEventHandler); @@ -37,6 +38,7 @@ GVAR(adjustPFH) = [{ }, 0, [_unit, _tripod]] call CBA_fnc_addPerFrameHandler; +[_unit, "blockThrow", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); // add mouse button action and hint [localize "STR_ACE_Tripod_Done", "", localize "STR_ACE_Tripod_ScrollAction"] call EFUNC(interaction,showMouseHint);