Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fastrope keybind #5606

Merged
merged 3 commits into from
Oct 14, 2017
Merged
Changes from 1 commit
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
11 changes: 10 additions & 1 deletion addons/fastroping/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@
[FUNC(fastRopeServerPFH), 0, _this] call CBA_fnc_addPerFrameHandler;
}] call CBA_fnc_addEventHandler;

// Keybinds
["ACE3 Vehicles", QGVAR(fastRope), localize LSTRING(Interaction_fastRope), {
if ([ACE_player, vehicle ACE_player] call FUNC(canFastRope)) then {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might want the following (probably don't need the in-vehicle check, but can't hurt)

if ((vehicle ACE_player) == player) exitWith {false};
if (!([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith))) exitWith {false};

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't you mean (vehicle ACE_player) == ACE_player?

[ACE_player, vehicle ACE_player] call FUNC(fastRope);
true
} else {
false
};
}, ""] call CBA_fnc_addKeybind;

["ACE3 Vehicles", QGVAR(cutRopes), localize LSTRING(Interaction_cutRopes), {
if ([vehicle ACE_player] call FUNC(canCutRopes)) then {
[vehicle ACE_player] call FUNC(cutRopes);
Expand All @@ -18,7 +28,6 @@
}, {false}] call CBA_fnc_addKeybind;



#ifdef DRAW_FASTROPE_INFO
addMissionEventHandler ["Draw3D", {
if (!(cursorObject isKindOf "Helicopter")) exitWith {};
Expand Down