Skip to content

Commit

Permalink
Fix hoist keybind not checking conditions (#477)
Browse files Browse the repository at this point in the history
* Fix hoist deploying on non-Hatchet Helicopters
  • Loading branch information
BroBeansCPG authored Jan 27, 2025
1 parent db4e762 commit 8bcb632
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addons/uh60_hoist/Armakeybinds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class CfgUserActions
class Vtx_HOOK_DEPLOY {
displayName = "Deploy Hook";
tooltip = "Deploys the Hoist Hook";
onActivate = "[vehicle player] call vtx_uh60_hoist_fnc_deployHook;"; // _this is always true.
onActivate = "_canDeploy = [vehicle player] call vtx_uh60_hoist_fnc_canDeployHook; if (_canDeploy) then {[vehicle player] call vtx_uh60_hoist_fnc_deployHook;}"; // _this is always true.
onDeactivate = ""; // _this is always false.
onAnalog = ""; // _this is the scalar analog value.
analogChangeThreshold = 0.1; // Minimum change required to trigger the onAnalog EH (default: 0.01).
Expand Down
1 change: 1 addition & 0 deletions addons/uh60_hoist/functions/fnc_canDeployHook.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

params ["_heli"];

if !(_heli isKindOf "vtx_h60_base") exitWith {false};
private _hoist_vars = _heli getVariable ["vtx_uh60_hoist_vars", []];
if !(_hoist_vars isEqualTo []) exitWith{false};
if (_heli animationSourcePhase "hoist_hook_hide" != 0) exitWith {false};
Expand Down

0 comments on commit 8bcb632

Please sign in to comment.