Skip to content

Commit

Permalink
AdvThrowing - Fix showing wind info when no grenades in inventory (ac…
Browse files Browse the repository at this point in the history
…emod#10008)

AdvThrowing - Fix showing wind info if no grenades in inventory
  • Loading branch information
PabstMirror authored and blake8090 committed Aug 18, 2024
1 parent 4ea3bfc commit ba62d08
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions addons/advanced_throwing/functions/fnc_prepare.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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];

Expand Down

0 comments on commit ba62d08

Please sign in to comment.