2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2016-08-22 13:09:08 +00:00
|
|
|
/*
|
|
|
|
* Author: Dslyecxi, Jonpas
|
|
|
|
* Key down event.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Control <CONTROL>
|
|
|
|
* 1: Key <NUMBER>
|
|
|
|
* 2: Shift <BOOL>
|
|
|
|
* 3: Ctrl <BOOL>
|
|
|
|
* 4: Alt <BOOL>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2016-09-02 23:39:34 +00:00
|
|
|
* [control, 5, false, true, false] call ace_advanced_throwing_fnc_onKeyDown
|
2016-08-22 13:09:08 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {false};
|
|
|
|
|
|
|
|
params ["", "_key", "_shift", "_ctrl", "_alt"];
|
|
|
|
|
|
|
|
// Exit if any of the action keys is pressed
|
|
|
|
{
|
|
|
|
if (_key in _x) exitWith {
|
|
|
|
[ACE_player, "Pressed a key that cycles us out of throwables"] call FUNC(exitThrowMode);
|
|
|
|
};
|
|
|
|
} forEach [
|
|
|
|
actionKeys "ReloadMagazine",
|
|
|
|
actionKeys "Handgun",
|
|
|
|
actionKeys "Binoculars",
|
|
|
|
actionKeys "SwitchWeapon",
|
|
|
|
actionKeys "Optics",
|
|
|
|
actionKeys "NextWeapon",
|
|
|
|
actionKeys "PrevWeapon",
|
|
|
|
actionKeys "OpticsTemp",
|
|
|
|
actionKeys "SwitchPrimary",
|
|
|
|
actionKeys "SwitchHandgun",
|
|
|
|
actionKeys "SwitchSecondary"
|
|
|
|
];
|
|
|
|
|
|
|
|
false
|