From 1a4ed7b7b4427e94c1541e13c967b5312b7390b2 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 6 Sep 2016 14:54:42 -0500 Subject: [PATCH] Grenades - disable throw mode / keybind if advThrow (#4350) --- addons/grenades/XEH_postInit.sqf | 2 ++ addons/grenades/functions/fnc_throwGrenade.sqf | 1 + 2 files changed, 3 insertions(+) diff --git a/addons/grenades/XEH_postInit.sqf b/addons/grenades/XEH_postInit.sqf index 71347d721c..96355fe3bf 100644 --- a/addons/grenades/XEH_postInit.sqf +++ b/addons/grenades/XEH_postInit.sqf @@ -15,6 +15,8 @@ GVAR(flashbangPPEffectCC) ppEffectForceInNVG true; if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; + // Don't change mode or show hint if advanced throwing is active + if (ACE_player getVariable [QEGVAR(advanced_throwing,inHand), false]) exitWith {false}; // Statement [] call FUNC(nextMode); diff --git a/addons/grenades/functions/fnc_throwGrenade.sqf b/addons/grenades/functions/fnc_throwGrenade.sqf index 5f66dc30bf..8db3cf3829 100644 --- a/addons/grenades/functions/fnc_throwGrenade.sqf +++ b/addons/grenades/functions/fnc_throwGrenade.sqf @@ -61,6 +61,7 @@ if (getNumber (_config >> QGVAR(incendiary)) == 1) then { // handle throw modes if (_unit != ACE_player) exitWith {}; +if (_unit getVariable [QEGVAR(advanced_throwing,primed), false]) exitWith {LOG("advanced_throwing throw");}; private _mode = missionNamespace getVariable [QGVAR(currentThrowMode), 0];