From f97f11d224388c0b433ce3524ee0cb25f2d5f167 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 22 May 2024 21:19:40 -0500 Subject: [PATCH] AdvThrowing - Fix showing wind info when no grenades in inventory (#10008) AdvThrowing - Fix showing wind info if no grenades in inventory --- addons/advanced_throwing/functions/fnc_prepare.sqf | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/addons/advanced_throwing/functions/fnc_prepare.sqf b/addons/advanced_throwing/functions/fnc_prepare.sqf index 7926c2c864..3008b8e540 100644 --- a/addons/advanced_throwing/functions/fnc_prepare.sqf +++ b/addons/advanced_throwing/functions/fnc_prepare.sqf @@ -18,15 +18,6 @@ params ["_unit"]; TRACE_1("params",_unit); -// Temporarily enable wind info, to aid in throwing smoke grenades effectively -if ( - GVAR(enableTempWindInfo) && - {!(missionNamespace getVariable [QEGVAR(weather,WindInfo), false])} -) then { - [] call EFUNC(weather,displayWindInfo); - GVAR(tempWindInfo) = true; -}; - // Select next throwable if one already in hand if (_unit getVariable [QGVAR(inHand), false]) exitWith { TRACE_1("inHand",_unit); @@ -44,6 +35,11 @@ if (isNull (_unit getVariable [QGVAR(activeThrowable), objNull]) && {(currentThr TRACE_1("no throwables",_unit); }; +// Temporarily enable wind info, to aid in throwing smoke grenades effectively +if (GVAR(enableTempWindInfo) && {!(missionNamespace getVariable [QEGVAR(weather,WindInfo), false])}) then { + [] call EFUNC(weather,displayWindInfo); + GVAR(tempWindInfo) = true; +}; _unit setVariable [QGVAR(inHand), true];