AdvThrowing - Fix showing wind info when no grenades in inventory (#10008)

AdvThrowing - Fix showing wind info if no grenades in inventory
This commit is contained in:
PabstMirror 2024-05-22 21:19:40 -05:00 committed by GitHub
parent 67fe22a5a6
commit f97f11d224
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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];