2016-05-05 16:06:12 +00:00
|
|
|
// TODO remove unused file
|
2016-09-01 00:29:08 +00:00
|
|
|
//[[[cog import generate_private_arrays ]]]
|
|
|
|
private ["_dialog","_forceGear","_handled","_target","_targets","_vehicle"];
|
|
|
|
//[[[end]]]
|
2015-09-14 20:55:36 +00:00
|
|
|
closeDialog 0;
|
|
|
|
_dialog = "";
|
|
|
|
_handled = false;
|
|
|
|
_forceGear = false;
|
|
|
|
_target = objNull;
|
2016-04-08 20:21:46 +00:00
|
|
|
|
|
|
|
// params ["_ctrl"];
|
2015-09-14 20:55:36 +00:00
|
|
|
|
|
|
|
_vehicle = vehicle player;
|
|
|
|
if (_vehicle != player) exitWith {false};
|
|
|
|
if (!isNull cursorTarget) then {
|
|
|
|
if ((player distance cursorTarget) < 6) then {
|
|
|
|
_target = cursorTarget;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if (isNull _target) then {
|
2017-09-02 22:06:27 +00:00
|
|
|
_targets = nearestObjects [player, ["WeaponHolder", "WeaponHolderSimulated"], 3];
|
2015-09-14 20:55:36 +00:00
|
|
|
if !(_targets isEqualTo []) then {
|
|
|
|
_target = _targets select 0;
|
|
|
|
_forceGear = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
if (!isNull _target) then {
|
|
|
|
if (_forceGear) then {
|
|
|
|
player action ["Gear", _target];
|
|
|
|
_handled = true;
|
|
|
|
} else {
|
|
|
|
if (_dialog != "") then {
|
|
|
|
_handled = createdialog _dialog;
|
|
|
|
setMousePosition [0.5, 0.5];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2016-01-08 04:32:52 +00:00
|
|
|
_handled
|