Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions addons/advanced_throwing/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ GVAR(ammoEventHandlers) = createHashMap;
// Exit on HC
if (!hasInterface) exitWith {};

// Temporary Wind Info indication
GVAR(tempWindInfo) = false;

// Ammo/Magazines look-up hash for correctness of initSpeed
GVAR(ammoMagLookup) = call CBA_fnc_createNamespace;
{
Expand Down
6 changes: 6 additions & 0 deletions addons/advanced_throwing/functions/fnc_exitThrowMode.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ _unit setVariable [QGVAR(dropDistance), DROP_DISTANCE_DEFAULT];
// Remove controls hint (check if ever enabled is inside the function)
call EFUNC(interaction,hideMouseHint);

// Hide wind info after throw, if it was temporarily enabled for the throw
if (GVAR(tempWindInfo)) then {
EGVAR(weather,WindInfo) = false;
GVAR(tempWindInfo) = false;
};

// Remove throw action
[_unit, "DefaultAction", _unit getVariable [QGVAR(throwAction), -1]] call EFUNC(common,removeActionEventHandler);

Expand Down
6 changes: 6 additions & 0 deletions addons/advanced_throwing/functions/fnc_prepare.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
params ["_unit"];
TRACE_1("params",_unit);

// Temporarily enable wind info, to aid in throwing smoke grenades effectively
if (!EGVAR(weather,WindInfo)) then {
Comment thread
mrschick marked this conversation as resolved.
Outdated
[] 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 Down
5 changes: 3 additions & 2 deletions addons/weather/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#include "script_component.hpp"

GVAR(WindInfo) = false;

["ACE3 Common", QGVAR(WindInfoKey), localize LSTRING(WindInfoKeyToggle),
{
// Conditions: canInteract
if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
if !([ACE_player, ACE_player, ["isNotDragging", "isNotCarrying", "isNotSitting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
Comment thread
mrschick marked this conversation as resolved.

// Statement
[] call FUNC(displayWindInfo);
Expand All @@ -15,7 +16,7 @@ GVAR(WindInfo) = false;
["ACE3 Common", QGVAR(WindInfoKey_hold), localize LSTRING(WindInfoKeyHold),
{
// Conditions: canInteract
if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
if !([ACE_player, ACE_player, ["isNotDragging", "isNotCarrying", "isNotSitting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
Comment thread
mrschick marked this conversation as resolved.

// Statement
[] call FUNC(displayWindInfo);
Expand Down
2 changes: 1 addition & 1 deletion addons/weather/functions/fnc_displayWindInfo.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ TRACE_1("Starting Wind Info PFEH",GVAR(WindInfo));
disableSerialization;
params ["", "_pfID"];

if ((!GVAR(WindInfo)) || {!([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith))}) exitWith {
if ((!GVAR(WindInfo)) || {!([ACE_player, ACE_player, ["notOnMap", "isNotDragging", "isNotCarrying", "isNotSitting", "isNotInside"]] call EFUNC(common,canInteractWith))}) exitWith {
TRACE_1("Ending Wind Info PFEH",GVAR(WindInfo));
GVAR(WindInfo) = false;
(["RscWindIntuitive"] call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
Expand Down