Underwater actions support (#4984)

* Enable majority of actions underwater

* Remove log

* Add logistics_wirecutter support (don't play kneel animations underwater - looks silly)

* Don't perform kneel animations when repairing or medicaling underwater

* Fix interaction menu rendering underwater (was moving based on player eye level due to height max used for large vehicles)

* Fix attach underwater (LIW does not work underwater, LIS does), Add attach scan drawing define

* Remove left-over systemChat

* Remove vehiclelock from Plane, Disallow linking belt underwater, Allow checking ammo when sitting via action (was already possible via keybind), Use param for LIS
This commit is contained in:
jonpas 2017-08-22 20:30:56 +02:00 committed by PabstMirror
parent a67815d072
commit e11e102a76
59 changed files with 331 additions and 223 deletions

View File

@ -60,6 +60,7 @@ class CfgVehicles {
displayName = CSTRING(PickUp); displayName = CSTRING(PickUp);
condition = QUOTE([ARR_2(_player,true)] call FUNC(canPrepare)); condition = QUOTE([ARR_2(_player,true)] call FUNC(canPrepare));
statement = QUOTE(_this call FUNC(pickUp)); statement = QUOTE(_this call FUNC(pickUp));
exceptions[] = {"isNotSwimming"};
distance = 1.8; // Requires >1.7 to work when standing with weapon on back distance = 1.8; // Requires >1.7 to work when standing with weapon on back
icon = "\a3\ui_f\data\igui\cfg\actions\obsolete\ui_action_takemine_ca.paa"; icon = "\a3\ui_f\data\igui\cfg\actions\obsolete\ui_action_takemine_ca.paa";
}; };

View File

@ -31,7 +31,7 @@ GVAR(ammoMagLookup) = call CBA_fnc_createNamespace;
["ACE3 Weapons", QGVAR(dropModeToggle), localize LSTRING(DropModeToggle), { ["ACE3 Weapons", QGVAR(dropModeToggle), localize LSTRING(DropModeToggle), {
// Condition // Condition
if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {false}; if (!(ACE_player getVariable [QGVAR(inHand), false]) || {underwater ACE_player}) exitWith {false};
// Statement // Statement
private _currentDropMode = ACE_player getVariable [QGVAR(dropMode), false]; private _currentDropMode = ACE_player getVariable [QGVAR(dropMode), false];

View File

@ -32,5 +32,5 @@ GVAR(enabled) &&
#endif #endif
{!(call EFUNC(common,isFeatureCameraActive))} && {!(call EFUNC(common,isFeatureCameraActive))} &&
{[_unit, objNull, ["isNotInside", "isNotSitting"/*, "isNotOnLadder"*/]] call EFUNC(common,canInteractWith)} && // Ladder needs positioning fixes on throw {[_unit, objNull, ["isNotInside", "isNotSwimming", "isNotSitting"/*, "isNotOnLadder"*/]] call EFUNC(common,canInteractWith)} && // Ladder needs positioning fixes on throw
{_unit call CBA_fnc_canUseWeapon} // Disable in non-FFV seats due to surface detection issues {_unit call CBA_fnc_canUseWeapon} // Disable in non-FFV seats due to surface detection issues

View File

@ -128,6 +128,10 @@ _activeThrowable setDir (_unitDirVisual + 90);
private _pitch = [-30, -90] select (_throwType == "high"); private _pitch = [-30, -90] select (_throwType == "high");
[_activeThrowable, _pitch, 0] call BIS_fnc_setPitchBank; [_activeThrowable, _pitch, 0] call BIS_fnc_setPitchBank;
// Force drop mode if underwater
if (underwater player) then {
ACE_player setVariable [QGVAR(dropMode), true];
};
if (ACE_player getVariable [QGVAR(dropMode), false]) then { if (ACE_player getVariable [QGVAR(dropMode), false]) then {
_posFin = _posFin vectorAdd (AGLToASL (positionCameraToWorld [_leanCoef, 0, ACE_player getVariable [QGVAR(dropDistance), DROP_DISTANCE_DEFAULT]])); _posFin = _posFin vectorAdd (AGLToASL (positionCameraToWorld [_leanCoef, 0, ACE_player getVariable [QGVAR(dropDistance), DROP_DISTANCE_DEFAULT]]));

View File

@ -6,7 +6,7 @@
displayName = CSTRING(AttachDetach); \ displayName = CSTRING(AttachDetach); \
condition = QUOTE(_this call FUNC(canAttach)); \ condition = QUOTE(_this call FUNC(canAttach)); \
insertChildren = QUOTE(_this call FUNC(getChildrenAttachActions)); \ insertChildren = QUOTE(_this call FUNC(getChildrenAttachActions)); \
exceptions[] = {}; \ exceptions[] = {"isNotSwimming"}; \
showDisabled = 0; \ showDisabled = 0; \
priority = 0; \ priority = 0; \
icon = QPATHTOF(UI\attach_ca.paa); \ icon = QPATHTOF(UI\attach_ca.paa); \
@ -15,7 +15,7 @@
displayName = CSTRING(Detach); \ displayName = CSTRING(Detach); \
condition = QUOTE(_this call FUNC(canDetach)); \ condition = QUOTE(_this call FUNC(canDetach)); \
statement = QUOTE(_this call FUNC(detach) ); \ statement = QUOTE(_this call FUNC(detach) ); \
exceptions[] = {}; \ exceptions[] = {"isNotSwimming"}; \
showDisabled = 0; \ showDisabled = 0; \
priority = 0.1; \ priority = 0.1; \
icon = QPATHTOF(UI\detach_ca.paa); \ icon = QPATHTOF(UI\detach_ca.paa); \
@ -55,7 +55,7 @@ class CfgVehicles {
displayName = CSTRING(AttachDetach); displayName = CSTRING(AttachDetach);
condition = QUOTE(_this call FUNC(canAttach)); condition = QUOTE(_this call FUNC(canAttach));
insertChildren = QUOTE(_this call FUNC(getChildrenAttachActions)); insertChildren = QUOTE(_this call FUNC(getChildrenAttachActions));
exceptions[] = {"isNotDragging"}; exceptions[] = {"isNotDragging", "isNotSwimming"};
showDisabled = 0; showDisabled = 0;
priority = 5; priority = 5;
icon = QPATHTOF(UI\attach_ca.paa); icon = QPATHTOF(UI\attach_ca.paa);
@ -64,7 +64,7 @@ class CfgVehicles {
displayName = CSTRING(Detach); displayName = CSTRING(Detach);
condition = QUOTE(_this call FUNC(canDetach)); condition = QUOTE(_this call FUNC(canDetach));
statement = QUOTE(_this call FUNC(detach)); statement = QUOTE(_this call FUNC(detach));
exceptions[] = {"isNotDragging"}; exceptions[] = {"isNotDragging", "isNotSwimming"};
showDisabled = 0; showDisabled = 0;
priority = 5; priority = 5;
icon = QPATHTOF(UI\detach_ca.paa); icon = QPATHTOF(UI\detach_ca.paa);

View File

@ -83,7 +83,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
if ((GVAR(placeAction) != PLACE_WAITING) || if ((GVAR(placeAction) != PLACE_WAITING) ||
{_unit != ACE_player} || {_unit != ACE_player} ||
{!([_unit, _attachToVehicle, []] call EFUNC(common,canInteractWith))} || {!([_unit, _attachToVehicle, ["isNotSwimming"]] call EFUNC(common,canInteractWith))} ||
{!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) then { {!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) then {
[_idPFH] call CBA_fnc_removePerFrameHandler; [_idPFH] call CBA_fnc_removePerFrameHandler;

View File

@ -31,7 +31,7 @@ _actions = [];
if (getText (_item >> "ACE_Attachable") != "") then { if (getText (_item >> "ACE_Attachable") != "") then {
_displayName = getText(_item >> "displayName"); _displayName = getText(_item >> "displayName");
_picture = getText(_item >> "picture"); _picture = getText(_item >> "picture");
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction); _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {true}, {}, [_x]] call EFUNC(interact_menu,createAction);
_actions pushBack [_action, [], _target]; _actions pushBack [_action, [], _target];
}; };
}; };
@ -44,7 +44,7 @@ _actions = [];
if (getText (_item >> "ACE_Attachable") != "") then { if (getText (_item >> "ACE_Attachable") != "") then {
_displayName = getText(_item >> "displayName"); _displayName = getText(_item >> "displayName");
_picture = getText(_item >> "picture"); _picture = getText(_item >> "picture");
_action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction); _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {true}, {}, [_x]] call EFUNC(interact_menu,createAction);
_actions pushBack [_action, [], _target]; _actions pushBack [_action, [], _target];
}; };
}; };

View File

@ -54,9 +54,20 @@ while {(_closeInMax - _closeInMin) > 0.01} do {
_endPosShifted = _endPosTest vectorAdd _x; _endPosShifted = _endPosTest vectorAdd _x;
_endASL = if (surfaceIsWater _startingPosShifted) then {_endPosShifted} else {ATLtoASL _endPosShifted}; _endASL = if (surfaceIsWater _startingPosShifted) then {_endPosShifted} else {ATLtoASL _endPosShifted};
//Uncomment to see the lazor show, and see how the scanning works: #ifdef DRAW_ATTACH_SCAN
// drawLine3D [_startingPosShifted, _endPosShifted, [1,0,0,1]]; [{
if (_attachToVehicle in lineIntersectsWith [_startASL, _endASL, _unit]) exitWith {_doesIntersect = true}; params ["_args", "_idPFH"];
_args params ["_startingPosShifted", "_endPosShifted", "_timeAdded"];
drawLine3D [_startingPosShifted, _endPosShifted, [1,0,0,1]];
if (_timeAdded + 5 < CBA_missionTime) then {
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
}, 0, [_startingPosShifted, _endPosShifted, CBA_missionTime]] call CBA_fnc_addPerFrameHandler;
#endif
// Default max results is 1, so take only first subarray and select parentObject (object itself or parent of proxy)
private _intersectObject = ((lineIntersectsSurfaces [_startASL, _endASL, _unit]) param [0, objNull]) param [3, objNull];
if (_attachToVehicle == _intersectObject) exitWith {_doesIntersect = true};
} forEach [[0,0,0.045], [0,0,-0.045], [0,0.045,0], [0,-0.045,0], [0.045,0,0], [-0.045,0,0]]; } forEach [[0,0,0.045], [0,0,-0.045], [0,0.045,0], [0,-0.045,0], [0.045,0,0], [-0.045,0,0]];
} forEach [[0,0,0], [0,0,0.05], [0,0,-0.05]]; } forEach [[0,0,0], [0,0,0.05], [0,0,-0.05]];

View File

@ -2,6 +2,7 @@
#define COMPONENT_BEAUTIFIED Attach #define COMPONENT_BEAUTIFIED Attach
#include "\z\ace\addons\main\script_mod.hpp" #include "\z\ace\addons\main\script_mod.hpp"
// #define DRAW_ATTACH_SCAN
// #define DEBUG_MODE_FULL // #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE // #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS // #define ENABLE_PERFORMANCE_COUNTERS

View File

@ -2,14 +2,13 @@ class CfgVehicles {
class Man; class Man;
class CAManBase: Man { class CAManBase: Man {
class ACE_Actions { class ACE_Actions {
class ACE_ApplyHandcuffs { class ACE_ApplyHandcuffs {
displayName = CSTRING(SetCaptive); displayName = CSTRING(SetCaptive);
selection = "righthand"; selection = "righthand";
distance = 2; distance = 2;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canApplyHandcuffs)); condition = QUOTE([ARR_2(_player, _target)] call FUNC(canApplyHandcuffs));
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doApplyHandcuffs)); statement = QUOTE([ARR_2(_player, _target)] call FUNC(doApplyHandcuffs));
exceptions[] = {}; exceptions[] = {"isNotSwimming", "isNotInside"};
icon = QPATHTOF(UI\handcuff_ca.paa); icon = QPATHTOF(UI\handcuff_ca.paa);
}; };
@ -20,7 +19,7 @@ class CfgVehicles {
distance = 2; distance = 2;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canRemoveHandcuffs)); condition = QUOTE([ARR_2(_player, _target)] call FUNC(canRemoveHandcuffs));
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doRemoveHandcuffs)); statement = QUOTE([ARR_2(_player, _target)] call FUNC(doRemoveHandcuffs));
exceptions[] = {}; exceptions[] = {"isNotSwimming", "isNotInside"};
icon = QPATHTOF(UI\handcuff_ca.paa); icon = QPATHTOF(UI\handcuff_ca.paa);
}; };
class ACE_EscortCaptive { class ACE_EscortCaptive {
@ -28,7 +27,7 @@ class CfgVehicles {
distance = 4; distance = 4;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canEscortCaptive)); condition = QUOTE([ARR_2(_player, _target)] call FUNC(canEscortCaptive));
statement = QUOTE([ARR_3(_player, _target, true)] call FUNC(doEscortCaptive)); statement = QUOTE([ARR_3(_player, _target, true)] call FUNC(doEscortCaptive));
exceptions[] = {}; exceptions[] = {"isNotSwimming"};
showDisabled = 0; showDisabled = 0;
icon = QPATHTOF(UI\captive_ca.paa); icon = QPATHTOF(UI\captive_ca.paa);
priority = 2.3; priority = 2.3;
@ -38,7 +37,7 @@ class CfgVehicles {
distance = 4; distance = 4;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canStopEscorting)); condition = QUOTE([ARR_2(_player, _target)] call FUNC(canStopEscorting));
statement = QUOTE([ARR_3(_player,_target, false)] call FUNC(doEscortCaptive)); statement = QUOTE([ARR_3(_player,_target, false)] call FUNC(doEscortCaptive));
exceptions[] = {"isNotEscorting"}; exceptions[] = {"isNotEscorting", "isNotSwimming"};
showDisabled = 0; showDisabled = 0;
icon = QPATHTOF(UI\captive_ca.paa); icon = QPATHTOF(UI\captive_ca.paa);
priority = 2.3; priority = 2.3;
@ -48,7 +47,7 @@ class CfgVehicles {
distance = 4; distance = 4;
condition = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(canLoadCaptive)); condition = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(canLoadCaptive));
statement = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(doLoadCaptive)); statement = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(doLoadCaptive));
exceptions[] = {"isNotEscorting"}; exceptions[] = {"isNotEscorting", "isNotSwimming"};
showDisabled = 0; showDisabled = 0;
icon = QPATHTOF(UI\captive_ca.paa); icon = QPATHTOF(UI\captive_ca.paa);
priority = 2.2; priority = 2.2;
@ -58,6 +57,7 @@ class CfgVehicles {
distance = 4; distance = 4;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canUnloadCaptive)); condition = QUOTE([ARR_2(_player, _target)] call FUNC(canUnloadCaptive));
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doUnloadCaptive)); statement = QUOTE([ARR_2(_player, _target)] call FUNC(doUnloadCaptive));
exceptions[] = {"isNotSwimming"};
priority = 1.2; priority = 1.2;
}; };
}; };
@ -68,7 +68,7 @@ class CfgVehicles {
displayName = CSTRING(StopEscorting); displayName = CSTRING(StopEscorting);
condition = QUOTE([ARR_2(_player, objNull)] call FUNC(canStopEscorting)); condition = QUOTE([ARR_2(_player, objNull)] call FUNC(canStopEscorting));
statement = QUOTE([ARR_3(_player,objNull, false)] call FUNC(doEscortCaptive)); statement = QUOTE([ARR_3(_player,objNull, false)] call FUNC(doEscortCaptive));
exceptions[] = {"isNotEscorting"}; exceptions[] = {"isNotEscorting", "isNotSwimming"};
showDisabled = 0; showDisabled = 0;
priority = 2.3; priority = 2.3;
}; };
@ -76,7 +76,7 @@ class CfgVehicles {
displayName = CSTRING(StartSurrendering); displayName = CSTRING(StartSurrendering);
condition = QUOTE([ARR_2(_player, true)] call FUNC(canSurrender)); condition = QUOTE([ARR_2(_player, true)] call FUNC(canSurrender));
statement = QUOTE([ARR_2(_player, true)] call FUNC(setSurrendered)); statement = QUOTE([ARR_2(_player, true)] call FUNC(setSurrendered));
exceptions[] = {}; exceptions[] = {"isNotSwimming"};
showDisabled = 0; showDisabled = 0;
priority = 0; priority = 0;
icon = QPATHTOF(UI\Surrender_ca.paa); icon = QPATHTOF(UI\Surrender_ca.paa);
@ -85,7 +85,7 @@ class CfgVehicles {
displayName = CSTRING(StopSurrendering); displayName = CSTRING(StopSurrendering);
condition = QUOTE([ARR_2(_player, false)] call FUNC(canSurrender)); condition = QUOTE([ARR_2(_player, false)] call FUNC(canSurrender));
statement = QUOTE([ARR_2(_player, false)] call FUNC(setSurrendered)); statement = QUOTE([ARR_2(_player, false)] call FUNC(setSurrendered));
exceptions[] = {"isNotSurrendering"}; exceptions[] = {"isNotSurrendering", "isNotSwimming"};
showDisabled = 0; showDisabled = 0;
priority = 0; priority = 0;
icon = QPATHTOF(UI\Surrender_ca.paa); icon = QPATHTOF(UI\Surrender_ca.paa);
@ -101,7 +101,7 @@ class CfgVehicles {
distance = 4; \ distance = 4; \
condition = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(canLoadCaptive)); \ condition = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(canLoadCaptive)); \
statement = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(doLoadCaptive)); \ statement = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(doLoadCaptive)); \
exceptions[] = {"isNotEscorting"}; \ exceptions[] = {"isNotEscorting", "isNotSwimming"}; \
priority = 1.2; \ priority = 1.2; \
}; \ }; \
}; \ }; \

View File

@ -12,7 +12,7 @@ class CfgVehicles {
icon = "\a3\ui_f\data\gui\cfg\Hints\chemlights_ca.paa"; icon = "\a3\ui_f\data\gui\cfg\Hints\chemlights_ca.paa";
condition = QUOTE(count ([ACE_player] call FUNC(getShieldComponents)) > 0); condition = QUOTE(count ([ACE_player] call FUNC(getShieldComponents)) > 0);
statement = "true"; statement = "true";
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"}; exceptions[] = {"isNotDragging", "isNotSwimming", "notOnMap", "isNotInside", "isNotSitting"};
insertChildren = QUOTE(_this call DFUNC(compileChemlightMenu)); insertChildren = QUOTE(_this call DFUNC(compileChemlightMenu));
showDisabled = 0; showDisabled = 0;
priority = 99; priority = 99;

View File

@ -8,8 +8,8 @@ class CfgVehicles {
distance = 3.5; distance = 3.5;
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canPlayerDisarmUnit)); condition = QUOTE([ARR_2(_player,_target)] call FUNC(canPlayerDisarmUnit));
statement = QUOTE([ARR_2(_player,_target)] call FUNC(openDisarmDialog)); statement = QUOTE([ARR_2(_player,_target)] call FUNC(openDisarmDialog));
exceptions[] = {"isNotSwimming"};
icon = QPATHTOF(UI\disarm.paa); icon = QPATHTOF(UI\disarm.paa);
exceptions[] = {};
}; };
}; };
}; };

View File

@ -20,4 +20,4 @@
params ["_player", "_target"]; params ["_player", "_target"];
([_target] call FUNC(canBeDisarmed)) && ([_target] call FUNC(canBeDisarmed)) &&
{([_player, _target, []] call EFUNC(common,canInteractWith))} {([_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith))}

View File

@ -6,6 +6,7 @@ class CfgVehicles {
displayName = CSTRING(itemName); displayName = CSTRING(itemName);
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTakeDogtag)); condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTakeDogtag));
statement = ""; statement = "";
exceptions[] = {"isNotSwimming", "isNotInside"};
showDisabled = 0; showDisabled = 0;
distance = 1.75; distance = 1.75;
icon = QPATHTOF(data\dogtag_icon_ca.paa); icon = QPATHTOF(data\dogtag_icon_ca.paa);
@ -14,6 +15,7 @@ class CfgVehicles {
displayName = CSTRING(checkDogtag); displayName = CSTRING(checkDogtag);
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canCheckDogtag)); condition = QUOTE([ARR_2(_player,_target)] call FUNC(canCheckDogtag));
statement = QUOTE([ARR_2(_player,_target)] call FUNC(checkDogtag)); statement = QUOTE([ARR_2(_player,_target)] call FUNC(checkDogtag));
exceptions[] = {"isNotSwimming", "isNotInside"};
showDisabled = 0; showDisabled = 0;
priority = 3; priority = 3;
icon = QPATHTOF(data\dogtag_icon_ca.paa); icon = QPATHTOF(data\dogtag_icon_ca.paa);
@ -22,6 +24,7 @@ class CfgVehicles {
displayName = CSTRING(takeDogtag); displayName = CSTRING(takeDogtag);
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTakeDogtag)); condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTakeDogtag));
statement = QUOTE([ARR_2(_player,_target)] call FUNC(takeDogtag)); statement = QUOTE([ARR_2(_player,_target)] call FUNC(takeDogtag));
exceptions[] = {"isNotSwimming", "isNotInside"};
showDisabled = 0; showDisabled = 0;
priority = 3; priority = 3;
icon = QPATHTOF(data\dogtag_icon_ca.paa); icon = QPATHTOF(data\dogtag_icon_ca.paa);
@ -34,7 +37,7 @@ class CfgVehicles {
displayName = CSTRING(checkItem); displayName = CSTRING(checkItem);
condition = "true"; condition = "true";
statement = ""; statement = "";
exceptions[] = {"isNotInside", "isNotSitting"}; exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
insertChildren = QUOTE(_this call DFUNC(addDogtagActions)); insertChildren = QUOTE(_this call DFUNC(addDogtagActions));
}; };
}; };

View File

@ -18,7 +18,7 @@
if (!alive ACE_player) exitWith {false}; if (!alive ACE_player) exitWith {false};
// Conditions: canInteract // Conditions: canInteract
if !([ACE_player, ACE_player, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; if !([ACE_player, ACE_player, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
//make sure player is dismounted or in a static weapon: //make sure player is dismounted or in a static weapon:
if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) exitWith {false}; if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) exitWith {false};
//Check camera view (not in GUNNER) //Check camera view (not in GUNNER)
@ -60,6 +60,11 @@ TRACE_1("sending finger to",_sendFingerToPlayers);
[QGVAR(fingered), [ACE_player, _fingerPosASL, _originASL vectorDistance _fingerPosASL], _sendFingerToPlayers] call CBA_fnc_targetEvent; [QGVAR(fingered), [ACE_player, _fingerPosASL, _originASL vectorDistance _fingerPosASL], _sendFingerToPlayers] call CBA_fnc_targetEvent;
[ACE_player, "GestureGo"] call EFUNC(common,doGesture); // BI gestures do not work underwater, play custom "point" gesture if loaded
if (["ace_gestures"] call EFUNC(common,isModLoaded)) then {
QEGVAR(gestures,point) call EFUNC(gestures,playSignal); // Works underwater
} else {
[ACE_player, "GestureGo"] call EFUNC(common,doGesture); // Does not work underwater
};
true true

View File

@ -17,7 +17,7 @@
if (!alive ACE_player) then {GVAR(fingersHash) = [] call CBA_fnc_hashCreate;}; if (!alive ACE_player) then {GVAR(fingersHash) = [] call CBA_fnc_hashCreate;};
// Conditions: canInteract // Conditions: canInteract
if !([ACE_player, ACE_player, ["isNotInside"]] call EFUNC(common,canInteractWith)) then {GVAR(fingersHash) = [] call CBA_fnc_hashCreate;}; if !([ACE_player, ACE_player, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) then {GVAR(fingersHash) = [] call CBA_fnc_hashCreate;};
// Make sure player is dismounted or in a static weapon: // Make sure player is dismounted or in a static weapon:
if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) then {GVAR(fingersHash) = [] call CBA_fnc_hashCreate;}; if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) then {GVAR(fingersHash) = [] call CBA_fnc_hashCreate;};

View File

@ -1,5 +1,4 @@
class CfgVehicles { class CfgVehicles {
class Man; class Man;
class CAManBase: Man { class CAManBase: Man {
class ACE_SelfActions { class ACE_SelfActions {
@ -7,6 +6,7 @@ class CfgVehicles {
displayName = CSTRING(Gestures); displayName = CSTRING(Gestures);
condition = QUOTE((canStand _target) && {GVAR(showOnInteractionMenu) == 2}); condition = QUOTE((canStand _target) && {GVAR(showOnInteractionMenu) == 2});
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
showDisabled = 1; showDisabled = 1;
priority = 3.5; priority = 3.5;
icon = QPATHTOF(UI\gestures_ca.paa); icon = QPATHTOF(UI\gestures_ca.paa);
@ -14,42 +14,48 @@ class CfgVehicles {
class GVAR(Advance) { class GVAR(Advance) {
displayName = CSTRING(Advance); displayName = CSTRING(Advance);
condition = QUOTE(true); condition = QUOTE(true);
statement = QUOTE([ARR_2(_target,'gestureAdvance')] call EFUNC(common,doGesture);); statement = QUOTE([ARR_2(_target,'gestureAdvance')] call EFUNC(common,doGesture));
//exceptions[] = {"isNotSwimming"}; // Does not work underwaterexceptions[] = {"isNotSwimming"};
showDisabled = 1; showDisabled = 1;
priority = 1.9; priority = 1.9;
}; };
class GVAR(Go) { class GVAR(Go) {
displayName = CSTRING(Go); displayName = CSTRING(Go);
condition = QUOTE(true); condition = QUOTE(true);
statement = QUOTE([ARR_2(_target,selectRandom [ARR_2('gestureGo','gestureGoB')])] call EFUNC(common,doGesture);); statement = QUOTE([ARR_2(_target,selectRandom [ARR_2('gestureGo','gestureGoB')])] call EFUNC(common,doGesture));
//exceptions[] = {"isNotSwimming"}; // Does not work underwater
showDisabled = 1; showDisabled = 1;
priority = 1.8; priority = 1.8;
}; };
class GVAR(Follow) { class GVAR(Follow) {
displayName = CSTRING(Follow); displayName = CSTRING(Follow);
condition = QUOTE(true); condition = QUOTE(true);
statement = QUOTE([ARR_2(_target,'gestureFollow')] call EFUNC(common,doGesture);); statement = QUOTE([ARR_2(_target,'gestureFollow')] call EFUNC(common,doGesture));
//exceptions[] = {"isNotSwimming"}; // Does not work underwater
showDisabled = 1; showDisabled = 1;
priority = 1.7; priority = 1.7;
}; };
class GVAR(Up) { class GVAR(Up) {
displayName = CSTRING(Up); displayName = CSTRING(Up);
condition = QUOTE(true); condition = QUOTE(true);
statement = QUOTE([ARR_2(_target,'gestureUp')] call EFUNC(common,doGesture);); statement = QUOTE([ARR_2(_target,'gestureUp')] call EFUNC(common,doGesture));
//exceptions[] = {"isNotSwimming"}; // Does not work underwater
showDisabled = 1; showDisabled = 1;
priority = 1.5; priority = 1.5;
}; };
class GVAR(CeaseFire) { class GVAR(CeaseFire) {
displayName = CSTRING(CeaseFire); displayName = CSTRING(CeaseFire);
condition = QUOTE(true); condition = QUOTE(true);
statement = QUOTE([ARR_2(_target,'gestureCeaseFire')] call EFUNC(common,doGesture);); statement = QUOTE([ARR_2(_target,'gestureCeaseFire')] call EFUNC(common,doGesture));
//exceptions[] = {"isNotSwimming"}; // Does not work underwater
showDisabled = 1; showDisabled = 1;
priority = 1.3; priority = 1.3;
}; };
class GVAR(Stop) { class GVAR(Stop) {
displayName = CSTRING(Stop); displayName = CSTRING(Stop);
condition = QUOTE(true); condition = QUOTE(true);
statement = QUOTE([ARR_2(_target,'gestureFreeze')] call EFUNC(common,doGesture);); // BI animation - is actualls "stop" in all stances but prone statement = QUOTE([ARR_2(_target,'gestureFreeze')] call EFUNC(common,doGesture)); // BI animation - is actually "stop" in all stances but prone
//exceptions[] = {"isNotSwimming"}; // Does not work underwater
showDisabled = 1; showDisabled = 1;
priority = 1.2; priority = 1.2;
}; };
@ -57,6 +63,7 @@ class CfgVehicles {
displayName = CSTRING(Forward); displayName = CSTRING(Forward);
condition = QUOTE(true); condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(forward)) call FUNC(playSignal)); statement = QUOTE(QUOTE(QGVAR(forward)) call FUNC(playSignal));
exceptions[] = {"isNotSwimming"};
showDisabled = 1; showDisabled = 1;
priority = 1.9; priority = 1.9;
}; };
@ -64,6 +71,7 @@ class CfgVehicles {
displayName = CSTRING(Regroup); displayName = CSTRING(Regroup);
condition = QUOTE(true); condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(regroup)) call FUNC(playSignal)); statement = QUOTE(QUOTE(QGVAR(regroup)) call FUNC(playSignal));
exceptions[] = {"isNotSwimming"};
showDisabled = 1; showDisabled = 1;
priority = 1.8; priority = 1.8;
}; };
@ -71,6 +79,7 @@ class CfgVehicles {
displayName = CSTRING(Freeze); displayName = CSTRING(Freeze);
condition = QUOTE(true); condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(freeze)) call FUNC(playSignal)); statement = QUOTE(QUOTE(QGVAR(freeze)) call FUNC(playSignal));
exceptions[] = {"isNotSwimming"};
showDisabled = 1; showDisabled = 1;
priority = 1.7; priority = 1.7;
}; };
@ -78,6 +87,7 @@ class CfgVehicles {
displayName = CSTRING(Cover); displayName = CSTRING(Cover);
condition = QUOTE(true); condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(cover)) call FUNC(playSignal)); statement = QUOTE(QUOTE(QGVAR(cover)) call FUNC(playSignal));
exceptions[] = {"isNotSwimming"};
showDisabled = 1; showDisabled = 1;
priority = 1.6; priority = 1.6;
}; };
@ -85,6 +95,7 @@ class CfgVehicles {
displayName = CSTRING(Point); displayName = CSTRING(Point);
condition = QUOTE(true); condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(point)) call FUNC(playSignal)); statement = QUOTE(QUOTE(QGVAR(point)) call FUNC(playSignal));
exceptions[] = {"isNotSwimming"};
showDisabled = 1; showDisabled = 1;
priority = 1.5; priority = 1.5;
}; };
@ -92,6 +103,7 @@ class CfgVehicles {
displayName = CSTRING(Engage); displayName = CSTRING(Engage);
condition = QUOTE(true); condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(engage)) call FUNC(playSignal)); statement = QUOTE(QUOTE(QGVAR(engage)) call FUNC(playSignal));
exceptions[] = {"isNotSwimming"};
showDisabled = 1; showDisabled = 1;
priority = 1.4; priority = 1.4;
}; };
@ -99,6 +111,7 @@ class CfgVehicles {
displayName = CSTRING(Hold); displayName = CSTRING(Hold);
condition = QUOTE(true); condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(hold)) call FUNC(playSignal)); statement = QUOTE(QUOTE(QGVAR(hold)) call FUNC(playSignal));
exceptions[] = {"isNotSwimming"};
showDisabled = 1; showDisabled = 1;
priority = 1.3; priority = 1.3;
}; };
@ -106,6 +119,7 @@ class CfgVehicles {
displayName = CSTRING(Warning); displayName = CSTRING(Warning);
condition = QUOTE(true); condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(warning)) call FUNC(playSignal)); statement = QUOTE(QUOTE(QGVAR(warning)) call FUNC(playSignal));
exceptions[] = {"isNotSwimming"};
showDisabled = 1; showDisabled = 1;
priority = 1.2; priority = 1.2;
}; };

View File

@ -18,7 +18,7 @@
TRACE_1("params",_this); TRACE_1("params",_this);
if (GVAR(showOnInteractionMenu) == 0) exitWith {false}; if (GVAR(showOnInteractionMenu) == 0) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; if !([ACE_player, objNull, ["isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
private _gesture = if ((_this select [0,2]) == "BI") then { private _gesture = if ((_this select [0,2]) == "BI") then {
//If it starts with BI, just strip off the leading BI and use it directly //If it starts with BI, just strip off the leading BI and use it directly

View File

@ -6,7 +6,7 @@ class CfgVehicles {
class ACE_PutInEarplugs { class ACE_PutInEarplugs {
displayName = CSTRING(EarPlugs_On); displayName = CSTRING(EarPlugs_On);
condition = QUOTE(GVAR(EnableCombatDeafness) && {!([_player] call FUNC(hasEarPlugsIn)) && {'ACE_EarPlugs' in items _player}}); condition = QUOTE(GVAR(EnableCombatDeafness) && {!([_player] call FUNC(hasEarPlugsIn)) && {'ACE_EarPlugs' in items _player}});
exceptions[] = {"isNotInside", "isNotSitting"}; exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
statement = QUOTE( [_player] call FUNC(putInEarPlugs) ); statement = QUOTE( [_player] call FUNC(putInEarPlugs) );
showDisabled = 0; showDisabled = 0;
priority = 2.5; priority = 2.5;
@ -15,7 +15,7 @@ class CfgVehicles {
class ACE_RemoveEarplugs { class ACE_RemoveEarplugs {
displayName = CSTRING(EarPlugs_Off); displayName = CSTRING(EarPlugs_Off);
condition = QUOTE( GVAR(EnableCombatDeafness) && {[_player] call FUNC(hasEarPlugsIn)}); condition = QUOTE( GVAR(EnableCombatDeafness) && {[_player] call FUNC(hasEarPlugsIn)});
exceptions[] = {"isNotInside", "isNotSitting"}; exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
statement = QUOTE( [_player] call FUNC(removeEarPlugs) ); statement = QUOTE( [_player] call FUNC(removeEarPlugs) );
showDisabled = 0; showDisabled = 0;
priority = 2.5; priority = 2.5;

View File

@ -40,6 +40,7 @@ class CfgVehicles {
displayName = CSTRING(PassMagazine); displayName = CSTRING(PassMagazine);
condition = ""; condition = "";
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
showDisabled = 0; showDisabled = 0;
priority = 3.3; priority = 3.3;
icon = "\a3\ui_f\data\gui\Rsc\RscDisplayArsenal\cargomag_ca.paa"; icon = "\a3\ui_f\data\gui\Rsc\RscDisplayArsenal\cargomag_ca.paa";
@ -48,6 +49,7 @@ class CfgVehicles {
displayName = CSTRING(PassMagazinePrimary); displayName = CSTRING(PassMagazinePrimary);
condition = QUOTE([ARR_3(_player,_target,primaryWeapon _target)] call FUNC(canPassMagazine)); condition = QUOTE([ARR_3(_player,_target,primaryWeapon _target)] call FUNC(canPassMagazine));
statement = QUOTE([ARR_3(_player,_target,primaryWeapon _target)] call FUNC(passMagazine)); statement = QUOTE([ARR_3(_player,_target,primaryWeapon _target)] call FUNC(passMagazine));
exceptions[] = {"isNotSwimming"};
showDisabled = 0; showDisabled = 0;
priority = 3; priority = 3;
icon = "\a3\ui_f\data\gui\Rsc\RscDisplayArsenal\primaryweapon_ca.paa"; icon = "\a3\ui_f\data\gui\Rsc\RscDisplayArsenal\primaryweapon_ca.paa";
@ -56,6 +58,7 @@ class CfgVehicles {
displayName = CSTRING(PassMagazineHandgun); displayName = CSTRING(PassMagazineHandgun);
condition = QUOTE([ARR_3(_player,_target,handgunWeapon _target)] call FUNC(canPassMagazine)); condition = QUOTE([ARR_3(_player,_target,handgunWeapon _target)] call FUNC(canPassMagazine));
statement = QUOTE([ARR_3(_player,_target,handgunWeapon _target)] call FUNC(passMagazine)); statement = QUOTE([ARR_3(_player,_target,handgunWeapon _target)] call FUNC(passMagazine));
exceptions[] = {"isNotSwimming"};
showDisabled = 0; showDisabled = 0;
priority = 1; priority = 1;
icon = "\a3\ui_f\data\gui\Rsc\RscDisplayArsenal\handgun_ca.paa"; icon = "\a3\ui_f\data\gui\Rsc\RscDisplayArsenal\handgun_ca.paa";
@ -66,6 +69,7 @@ class CfgVehicles {
displayName = CSTRING(TeamManagement); displayName = CSTRING(TeamManagement);
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam) && {GVAR(EnableTeamManagement)}); condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam) && {GVAR(EnableTeamManagement)});
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
showDisabled = 0; showDisabled = 0;
priority = 3.2; priority = 3.2;
icon = QPATHTOF(UI\team\team_management_ca.paa); icon = QPATHTOF(UI\team\team_management_ca.paa);
@ -74,6 +78,7 @@ class CfgVehicles {
displayName = CSTRING(AssignTeamRed); displayName = CSTRING(AssignTeamRed);
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam)); condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam));
statement = QUOTE([ARR_2(_target,'RED')] call DFUNC(joinTeam)); statement = QUOTE([ARR_2(_target,'RED')] call DFUNC(joinTeam));
exceptions[] = {"isNotSwimming"};
showDisabled = 1; showDisabled = 1;
icon = QPATHTOF(UI\team\team_red_ca.paa); icon = QPATHTOF(UI\team\team_red_ca.paa);
priority = 2.4; priority = 2.4;
@ -82,6 +87,7 @@ class CfgVehicles {
displayName = CSTRING(AssignTeamGreen); displayName = CSTRING(AssignTeamGreen);
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam)); condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam));
statement = QUOTE([ARR_2(_target,'GREEN')] call DFUNC(joinTeam)); statement = QUOTE([ARR_2(_target,'GREEN')] call DFUNC(joinTeam));
exceptions[] = {"isNotSwimming"};
showDisabled = 1; showDisabled = 1;
icon = QPATHTOF(UI\team\team_green_ca.paa); icon = QPATHTOF(UI\team\team_green_ca.paa);
priority = 2.3; priority = 2.3;
@ -90,6 +96,7 @@ class CfgVehicles {
displayName = CSTRING(AssignTeamBlue); displayName = CSTRING(AssignTeamBlue);
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam)); condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam));
statement = QUOTE([ARR_2(_target,'BLUE')] call DFUNC(joinTeam)); statement = QUOTE([ARR_2(_target,'BLUE')] call DFUNC(joinTeam));
exceptions[] = {"isNotSwimming"};
showDisabled = 1; showDisabled = 1;
icon = QPATHTOF(UI\team\team_blue_ca.paa); icon = QPATHTOF(UI\team\team_blue_ca.paa);
priority = 2.2; priority = 2.2;
@ -98,6 +105,7 @@ class CfgVehicles {
displayName = CSTRING(AssignTeamYellow); displayName = CSTRING(AssignTeamYellow);
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam)); condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam));
statement = QUOTE([ARR_2(_target,'YELLOW')] call DFUNC(joinTeam)); statement = QUOTE([ARR_2(_target,'YELLOW')] call DFUNC(joinTeam));
exceptions[] = {"isNotSwimming"};
showDisabled = 1; showDisabled = 1;
icon = QPATHTOF(UI\team\team_yellow_ca.paa); icon = QPATHTOF(UI\team\team_yellow_ca.paa);
priority = 2.1; priority = 2.1;
@ -106,6 +114,7 @@ class CfgVehicles {
displayName = CSTRING(LeaveTeam); displayName = CSTRING(LeaveTeam);
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam) && {assignedTeam _target != 'MAIN'}); condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam) && {assignedTeam _target != 'MAIN'});
statement = QUOTE([ARR_2(_target,'MAIN')] call DFUNC(joinTeam)); statement = QUOTE([ARR_2(_target,'MAIN')] call DFUNC(joinTeam));
exceptions[] = {"isNotSwimming"};
showDisabled = 1; showDisabled = 1;
icon = QPATHTOF(UI\team\team_white_ca.paa); icon = QPATHTOF(UI\team\team_white_ca.paa);
priority = 2.5; priority = 2.5;
@ -117,6 +126,7 @@ class CfgVehicles {
condition = QUOTE(GVAR(EnableTeamManagement) && {[ARR_2(_player,_target)] call DFUNC(canJoinGroup)}); condition = QUOTE(GVAR(EnableTeamManagement) && {[ARR_2(_player,_target)] call DFUNC(canJoinGroup)});
statement = QUOTE([_player] joinSilent group _target); statement = QUOTE([_player] joinSilent group _target);
modifierFunction = QUOTE(call FUNC(modifyJoinGroupAction)); modifierFunction = QUOTE(call FUNC(modifyJoinGroupAction));
exceptions[] = {"isNotSwimming"};
showDisabled = 0; showDisabled = 0;
priority = 2.6; priority = 2.6;
icon = QPATHTOF(UI\team\team_management_ca.paa); icon = QPATHTOF(UI\team\team_management_ca.paa);
@ -132,6 +142,7 @@ class CfgVehicles {
displayName = CSTRING(SendAway); displayName = CSTRING(SendAway);
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canInteractWithCivilian)); condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canInteractWithCivilian));
statement = QUOTE([ARR_2(_player,_target)] call DFUNC(sendAway)); statement = QUOTE([ARR_2(_player,_target)] call DFUNC(sendAway));
exceptions[] = {"isNotSwimming"};
showDisabled = 0; showDisabled = 0;
priority = 2.0; priority = 2.0;
}; };
@ -139,6 +150,7 @@ class CfgVehicles {
displayName = CSTRING(Pardon); displayName = CSTRING(Pardon);
condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canPardon)); condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canPardon));
statement = QUOTE([ARR_2(_player,_target)] call DFUNC(pardon)); statement = QUOTE([ARR_2(_player,_target)] call DFUNC(pardon));
exceptions[] = {"isNotSwimming"};
showDisabled = 0; showDisabled = 0;
priority = 2.5; priority = 2.5;
}; };
@ -146,6 +158,7 @@ class CfgVehicles {
displayName = CSTRING(GetOut); displayName = CSTRING(GetOut);
condition = QUOTE(!(isNull objectParent _target) && [ARR_2(_player,_target)] call DFUNC(canInteractWithCivilian)); condition = QUOTE(!(isNull objectParent _target) && [ARR_2(_player,_target)] call DFUNC(canInteractWithCivilian));
statement = QUOTE([_target] call EFUNC(common,unloadPerson)); statement = QUOTE([_target] call EFUNC(common,unloadPerson));
exceptions[] = {"isNotSwimming"};
showDisabled = 0; showDisabled = 0;
priority = 2.6; priority = 2.6;
}; };
@ -157,6 +170,7 @@ class CfgVehicles {
distance = 1.50; distance = 1.50;
condition = ""; condition = "";
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
}; };
class ACE_Head { class ACE_Head {
displayName = CSTRING(Head); displayName = CSTRING(Head);
@ -164,6 +178,7 @@ class CfgVehicles {
distance = 1.50; distance = 1.50;
condition = ""; condition = "";
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
}; };
class ACE_ArmLeft { class ACE_ArmLeft {
displayName = CSTRING(ArmLeft); displayName = CSTRING(ArmLeft);
@ -171,6 +186,7 @@ class CfgVehicles {
distance = 1.50; distance = 1.50;
condition = ""; condition = "";
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
}; };
class ACE_ArmRight { class ACE_ArmRight {
displayName = CSTRING(ArmRight); displayName = CSTRING(ArmRight);
@ -178,6 +194,7 @@ class CfgVehicles {
distance = 1.50; distance = 1.50;
condition = ""; condition = "";
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
}; };
class ACE_LegLeft { class ACE_LegLeft {
displayName = CSTRING(LegLeft); displayName = CSTRING(LegLeft);
@ -185,6 +202,7 @@ class CfgVehicles {
distance = 1.50; distance = 1.50;
condition = ""; condition = "";
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
}; };
class ACE_LegRight { class ACE_LegRight {
displayName = CSTRING(LegRight); displayName = CSTRING(LegRight);
@ -192,6 +210,7 @@ class CfgVehicles {
distance = 1.50; distance = 1.50;
condition = ""; condition = "";
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
}; };
class ACE_Weapon { class ACE_Weapon {
displayName = CSTRING(Weapon); displayName = CSTRING(Weapon);
@ -199,6 +218,7 @@ class CfgVehicles {
distance = 1.50; distance = 1.50;
condition = ""; condition = "";
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
}; };
class ACE_TapShoulderRight { class ACE_TapShoulderRight {
displayName = CSTRING(TapShoulder); displayName = CSTRING(TapShoulder);
@ -206,6 +226,7 @@ class CfgVehicles {
distance = 2.0; distance = 2.0;
condition = QUOTE([ARR_2(_player, _target)] call DFUNC(canTapShoulder)); condition = QUOTE([ARR_2(_player, _target)] call DFUNC(canTapShoulder));
statement = QUOTE([ARR_3(_player, _target, 0)] call DFUNC(tapShoulder)); statement = QUOTE([ARR_3(_player, _target, 0)] call DFUNC(tapShoulder));
exceptions[] = {"isNotSwimming"};
}; };
class ACE_TapShoulderLeft { class ACE_TapShoulderLeft {
displayName = CSTRING(TapShoulder); displayName = CSTRING(TapShoulder);
@ -213,6 +234,7 @@ class CfgVehicles {
distance = 2.0; distance = 2.0;
condition = QUOTE([ARR_2(_player, _target)] call DFUNC(canTapShoulder)); condition = QUOTE([ARR_2(_player, _target)] call DFUNC(canTapShoulder));
statement = QUOTE([ARR_3(_player, _target, 1)] call DFUNC(tapShoulder)); statement = QUOTE([ARR_3(_player, _target, 1)] call DFUNC(tapShoulder));
exceptions[] = {"isNotSwimming"};
}; };
}; };
@ -220,7 +242,7 @@ class CfgVehicles {
class ACE_TeamManagement { class ACE_TeamManagement {
displayName = CSTRING(TeamManagement); displayName = CSTRING(TeamManagement);
condition = QUOTE(GVAR(EnableTeamManagement)); condition = QUOTE(GVAR(EnableTeamManagement));
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"}; exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder"};
statement = ""; statement = "";
showDisabled = 1; showDisabled = 1;
priority = 3.2; priority = 3.2;
@ -229,7 +251,7 @@ class CfgVehicles {
class ACE_JoinTeamRed { class ACE_JoinTeamRed {
displayName = CSTRING(JoinTeamRed); displayName = CSTRING(JoinTeamRed);
condition = QUOTE(true); condition = QUOTE(true);
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"}; exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder"};
statement = QUOTE([ARR_2(_player,'RED')] call DFUNC(joinTeam)); statement = QUOTE([ARR_2(_player,'RED')] call DFUNC(joinTeam));
showDisabled = 1; showDisabled = 1;
priority = 2.4; priority = 2.4;
@ -238,7 +260,7 @@ class CfgVehicles {
class ACE_JoinTeamGreen { class ACE_JoinTeamGreen {
displayName = CSTRING(JoinTeamGreen); displayName = CSTRING(JoinTeamGreen);
condition = QUOTE(true); condition = QUOTE(true);
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"}; exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder"};
statement = QUOTE([ARR_2(_player,'GREEN')] call DFUNC(joinTeam)); statement = QUOTE([ARR_2(_player,'GREEN')] call DFUNC(joinTeam));
showDisabled = 1; showDisabled = 1;
priority = 2.3; priority = 2.3;
@ -247,7 +269,7 @@ class CfgVehicles {
class ACE_JoinTeamBlue { class ACE_JoinTeamBlue {
displayName = CSTRING(JoinTeamBlue); displayName = CSTRING(JoinTeamBlue);
condition = QUOTE(true); condition = QUOTE(true);
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"}; exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder"};
statement = QUOTE([ARR_2(_player,'BLUE')] call DFUNC(joinTeam)); statement = QUOTE([ARR_2(_player,'BLUE')] call DFUNC(joinTeam));
showDisabled = 1; showDisabled = 1;
priority = 2.2; priority = 2.2;
@ -256,7 +278,7 @@ class CfgVehicles {
class ACE_JoinTeamYellow { class ACE_JoinTeamYellow {
displayName = CSTRING(JoinTeamYellow); displayName = CSTRING(JoinTeamYellow);
condition = QUOTE(true); condition = QUOTE(true);
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"}; exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder"};
statement = QUOTE([ARR_2(_player,'YELLOW')] call DFUNC(joinTeam)); statement = QUOTE([ARR_2(_player,'YELLOW')] call DFUNC(joinTeam));
showDisabled = 1; showDisabled = 1;
priority = 2.1; priority = 2.1;
@ -265,7 +287,7 @@ class CfgVehicles {
class ACE_LeaveTeam { class ACE_LeaveTeam {
displayName = CSTRING(LeaveTeam); displayName = CSTRING(LeaveTeam);
condition = QUOTE(assignedTeam _player != 'MAIN'); condition = QUOTE(assignedTeam _player != 'MAIN');
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"}; exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder"};
statement = QUOTE([ARR_2(_player,'MAIN')] call DFUNC(joinTeam)); statement = QUOTE([ARR_2(_player,'MAIN')] call DFUNC(joinTeam));
showDisabled = 1; showDisabled = 1;
priority = 2.5; priority = 2.5;
@ -274,7 +296,7 @@ class CfgVehicles {
class ACE_BecomeLeader { class ACE_BecomeLeader {
displayName = CSTRING(BecomeLeader); displayName = CSTRING(BecomeLeader);
condition = QUOTE(_this call DFUNC(canBecomeLeader)); condition = QUOTE(_this call DFUNC(canBecomeLeader));
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"}; exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder"};
statement = QUOTE(_this call DFUNC(doBecomeLeader)); statement = QUOTE(_this call DFUNC(doBecomeLeader));
showDisabled = 1; showDisabled = 1;
priority = 1.0; priority = 1.0;
@ -283,7 +305,7 @@ class CfgVehicles {
class ACE_LeaveGroup { class ACE_LeaveGroup {
displayName = CSTRING(LeaveGroup); displayName = CSTRING(LeaveGroup);
condition = QUOTE(count (units group _player) > 1); condition = QUOTE(count (units group _player) > 1);
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"}; exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder"};
statement = QUOTE(_oldGroup = units group _player; _newGroup = createGroup side _player; [_player] joinSilent _newGroup; {_player reveal _x} forEach _oldGroup;); statement = QUOTE(_oldGroup = units group _player; _newGroup = createGroup side _player; [_player] joinSilent _newGroup; {_player reveal _x} forEach _oldGroup;);
showDisabled = 1; showDisabled = 1;
priority = 1.2; priority = 1.2;
@ -294,7 +316,7 @@ class CfgVehicles {
class ACE_Equipment { class ACE_Equipment {
displayName = CSTRING(Equipment); displayName = CSTRING(Equipment);
condition = QUOTE(true); condition = QUOTE(true);
exceptions[] = {"isNotInside", "notOnMap", "isNotSitting"}; exceptions[] = {"isNotSwimming", "isNotInside", "notOnMap", "isNotSitting"};
statement = ""; statement = "";
showDisabled = 1; showDisabled = 1;
priority = 4.5; priority = 4.5;
@ -316,6 +338,7 @@ class CfgVehicles {
displayName = CSTRING(Passengers); displayName = CSTRING(Passengers);
condition = "true"; condition = "true";
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); insertChildren = QUOTE(_this call DFUNC(addPassengersActions));
}; };
}; };
@ -343,6 +366,7 @@ class CfgVehicles {
displayName = CSTRING(Passengers); displayName = CSTRING(Passengers);
condition = "true"; condition = "true";
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); insertChildren = QUOTE(_this call DFUNC(addPassengersActions));
}; };
}; };
@ -369,6 +393,7 @@ class CfgVehicles {
displayName = CSTRING(Passengers); displayName = CSTRING(Passengers);
condition = "true"; condition = "true";
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); insertChildren = QUOTE(_this call DFUNC(addPassengersActions));
}; };
}; };
@ -379,6 +404,7 @@ class CfgVehicles {
displayName = CSTRING(Passengers); displayName = CSTRING(Passengers);
condition = "true"; condition = "true";
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); insertChildren = QUOTE(_this call DFUNC(addPassengersActions));
}; };
}; };
@ -398,6 +424,7 @@ class CfgVehicles {
displayName = CSTRING(Passengers); displayName = CSTRING(Passengers);
condition = "true"; condition = "true";
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); insertChildren = QUOTE(_this call DFUNC(addPassengersActions));
}; };
}; };
@ -425,6 +452,7 @@ class CfgVehicles {
displayName = CSTRING(Passengers); displayName = CSTRING(Passengers);
condition = "true"; condition = "true";
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); insertChildren = QUOTE(_this call DFUNC(addPassengersActions));
}; };
}; };
@ -465,6 +493,7 @@ class CfgVehicles {
distance = 6; distance = 6;
condition = QUOTE(_target call FUNC(canPush)); condition = QUOTE(_target call FUNC(canPush));
statement = QUOTE(_this call FUNC(push)); statement = QUOTE(_this call FUNC(push));
exceptions[] = {"isNotSwimming"};
showDisabled = 0; showDisabled = 0;
priority = -1; priority = -1;
}; };
@ -472,6 +501,7 @@ class CfgVehicles {
displayName = CSTRING(Passengers); displayName = CSTRING(Passengers);
condition = "true"; condition = "true";
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); insertChildren = QUOTE(_this call DFUNC(addPassengersActions));
}; };
}; };
@ -498,6 +528,7 @@ class CfgVehicles {
displayName = CSTRING(Passengers); displayName = CSTRING(Passengers);
condition = "true"; condition = "true";
statement = ""; statement = "";
exceptions[] = {"isNotSwimming"};
insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); insertChildren = QUOTE(_this call DFUNC(addPassengersActions));
}; };
}; };

View File

@ -19,7 +19,8 @@
private _bb = boundingBoxReal _target; private _bb = boundingBoxReal _target;
(_bb select 0) params ["_bbX", "_bbY", "_bbZ"]; (_bb select 0) params ["_bbX", "_bbY", "_bbZ"];
private _relPos = _target worldToModelVisual ASLToAGL EGVAR(interact_menu,cameraPosASL); private _cameraPosASL = EGVAR(interact_menu,cameraPosASL);
private _relPos = _target worldToModelVisual ASLToAGL _cameraPosASL;
#ifdef DEBUG_MODE_FULL #ifdef DEBUG_MODE_FULL
_relPos = _target worldToModelVisual ASLToAGL eyePos ACE_player; _relPos = _target worldToModelVisual ASLToAGL eyePos ACE_player;
#endif #endif
@ -47,9 +48,14 @@ if (_ndx > _ndy) then {
_pos = _relPos vectorMultiply ((1 / _ndz) min 0.8); _pos = _relPos vectorMultiply ((1 / _ndz) min 0.8);
}; };
}; };
//Set max height at player's eye level (prevent very high interactin point on choppers)
_pos set [2, (_pos select 2) min _dz]; // Set max height at player's eye level (prevent very high interaction point on choppers)
TRACE_4("",_bb,_bbX,_relPos, _pos); // Only when above water level to prevent underwater actions from following player eye level
if (_cameraPosASL select 2 >= 0) then {
_pos set [2, (_pos select 2) min _dz];
};
TRACE_4("",_bb,_bbX,_relPos,_pos,_cameraPosASL);
_pos _pos
/////////////////// ///////////////////

View File

@ -53,7 +53,11 @@ if (_ndx > _ndy) then {
}; };
}; };
//Set max height at player's eye level (prevent very high interactin point on choppers) // Set max height at player's eye level (prevent very high interaction point on vehicles)
_pos set [2, (_pos select 2) min _dz]; // Only when above water level to prevent underwater actions from following player eye level
if (_cameraPosASL select 2 >= 0) then {
_pos set [2, (_pos select 2) min _dz];
};
TRACE_4("",_bb,_bbX,_relPos,_pos,_cameraPosASL);
_pos _pos

View File

@ -23,33 +23,39 @@ private ["_timeToCut", "_progressCheck", "_onCompletion", "_onFail"];
if (_unit != ACE_player) exitWith {}; if (_unit != ACE_player) exitWith {};
_timeToCut = if ([ACE_player] call EFUNC(common,isEngineer)) then {7.5} else {11}; _timeToCut = if ([_unit] call EFUNC(common,isEngineer)) then {7.5} else {11};
[ACE_player, "AinvPknlMstpSnonWnonDr_medic5", 0] call EFUNC(common,doAnimation); if (!underwater _unit) then {
[_unit, "AinvPknlMstpSnonWnonDr_medic5", 0] call EFUNC(common,doAnimation);
};
_onCompletion = { _onCompletion = {
TRACE_1("_onCompletion",_this); TRACE_1("_onCompletion",_this);
(_this select 0) params ["_fenceObject", "", "_unit"]; (_this select 0) params ["_fenceObject", "", "_unit"];
_fenceObject setdamage 1; _fenceObject setdamage 1;
if (!underwater _unit) then {
[_unit, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation); [_unit, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
};
}; };
_onFail = { _onFail = {
TRACE_1("_onFail", _this); TRACE_1("_onFail", _this);
(_this select 0) params ["", "", "_unit"]; (_this select 0) params ["", "", "_unit"];
if (!underwater _unit) then {
[_unit, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation); [_unit, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
};
}; };
_progressCheck = { _progressCheck = {
params ["_args", "_passedTime"]; params ["_args", "_passedTime"];
_args params ["_fenceObject", "_lastSoundEffectTime"]; _args params ["_fenceObject", "_lastSoundEffectTime", "_unit"];
if (_passedTime > (_lastSoundEffectTime + SOUND_CLIP_TIME_SPACEING)) then { if (_passedTime > (_lastSoundEffectTime + SOUND_CLIP_TIME_SPACEING)) then {
playSound3D [QUOTE(PATHTO_R(sound\wirecut.ogg)), objNull, false, (getPosASL ACE_player), 3, 1, 10]; playSound3D [QUOTE(PATHTO_R(sound\wirecut.ogg)), objNull, false, (getPosASL _unit), 3, 1, 10];
_args set [1, _passedTime]; _args set [1, _passedTime];
}; };
((!isNull _fenceObject) && {(damage _fenceObject) < 1} && {("ACE_wirecutter" in (items ACE_player))}) ((!isNull _fenceObject) && {(damage _fenceObject) < 1} && {("ACE_wirecutter" in (items _unit))})
}; };
[_timeToCut, [_fenceObject,0,_unit], _onCompletion, _onFail, localize LSTRING(CuttingFence), _progressCheck] call EFUNC(common,progressBar); [_timeToCut, [_fenceObject,0,_unit], _onCompletion, _onFail, localize LSTRING(CuttingFence), _progressCheck, ["isNotSwimming"]] call EFUNC(common,progressBar);

View File

@ -47,7 +47,7 @@ TRACE_1("Starting wire-cut action PFEH",_interactionType);
}; };
_fncCondition = { _fncCondition = {
params ["_helper", "_player", "_attachedFence"]; params ["_helper", "_player", "_attachedFence"];
if (!([_player, _attachedFence, []] call EFUNC(common,canInteractWith))) exitWith {false}; if (!([_player, _attachedFence, ["isNotSwimming"]] call EFUNC(common,canInteractWith))) exitWith {false};
((!isNull _attachedFence) && {(damage _attachedFence) < 1} && {("ACE_wirecutter" in (items _player))} && { ((!isNull _attachedFence) && {(damage _attachedFence) < 1} && {("ACE_wirecutter" in (items _player))} && {
//Custom LOS check for fence //Custom LOS check for fence
private _headPos = ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot"); private _headPos = ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot");

View File

@ -5,7 +5,7 @@ class CfgVehicles {
class ACE_RepackMagazines { class ACE_RepackMagazines {
displayName = CSTRING(RepackMagazines); displayName = CSTRING(RepackMagazines);
condition = QUOTE(true); condition = QUOTE(true);
exceptions[] = {"isNotInside", "isNotSitting"}; exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
insertChildren = QUOTE(_this call FUNC(getMagazineChildren)); insertChildren = QUOTE(_this call FUNC(getMagazineChildren));
priority = -2; priority = -2;
icon = QPATHTOF(UI\repack_ca.paa); icon = QPATHTOF(UI\repack_ca.paa);

View File

@ -25,7 +25,7 @@ _args params ["_magazineClassname", "_lastAmmoCount"];
private _fullMagazineCount = getNumber (configFile >> "CfgMagazines" >> _magazineClassname >> "count"); private _fullMagazineCount = getNumber (configFile >> "CfgMagazines" >> _magazineClassname >> "count");
// Don't show anything if player can't interact // Don't show anything if player can't interact
if (!([ACE_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith {}; if (!([ACE_player, objNull, ["isNotInside", "isNotSitting", "isNowSwimming"]] call EFUNC(common,canInteractWith))) exitWith {};
// Count mags // Count mags
private _fullMags = 0; private _fullMags = 0;

View File

@ -29,7 +29,7 @@ private _fullMagazineCount = getNumber (_magazineCfg >> "count");
private _isBelt = isNumber (_magazineCfg >> "ACE_isBelt") && {(getNumber (_magazineCfg >> "ACE_isBelt")) == 1}; private _isBelt = isNumber (_magazineCfg >> "ACE_isBelt") && {(getNumber (_magazineCfg >> "ACE_isBelt")) == 1};
//Check canInteractWith: //Check canInteractWith:
if !([_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {}; if !([_player, objNull, ["isNotInside", "isNotSwimming", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {};
[_player] call EFUNC(common,goKneeling); [_player] call EFUNC(common,goKneeling);
@ -67,5 +67,5 @@ private _totalTime = _simEvents select (count _simEvents - 1) select 0;
{_this call FUNC(magazineRepackFinish)}, {_this call FUNC(magazineRepackFinish)},
(localize LSTRING(RepackingMagazine)), (localize LSTRING(RepackingMagazine)),
{_this call FUNC(magazineRepackProgress)}, {_this call FUNC(magazineRepackProgress)},
["isNotInside", "isNotSitting"] ["isNotInside", "isNotSwimming", "isNotSitting"]
] call EFUNC(common,progressBar); ] call EFUNC(common,progressBar);

View File

@ -1,7 +1,7 @@
class Medical { class Medical {
displayName = CSTRING(Actions_Medical); displayName = CSTRING(Actions_Medical);
runOnHover = 1; runOnHover = 1;
exceptions[] = {"isNotInside", "isNotSitting"}; exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation)); statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
condition = "true"; condition = "true";
icon = QPATHTOF(UI\icons\medical_cross.paa); icon = QPATHTOF(UI\icons\medical_cross.paa);
@ -9,7 +9,7 @@ class Medical {
class ACE_Head { class ACE_Head {
displayName = CSTRING(Head); displayName = CSTRING(Head);
icon = QPATHTOF(UI\icons\medical_cross.paa); icon = QPATHTOF(UI\icons\medical_cross.paa);
exceptions[] = {"isNotInside", "isNotSitting"}; exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation)); statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyMedicalAction)); modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true"; condition = "true";
@ -19,7 +19,7 @@ class Medical {
displayName = CSTRING(Bandage); displayName = CSTRING(Bandage);
distance = 2.0; distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(treatment));
showDisabled = 1; showDisabled = 1;
priority = 2; priority = 2;
@ -30,7 +30,7 @@ class Medical {
displayName = CSTRING(Actions_FieldDressing); displayName = CSTRING(Actions_FieldDressing);
distance = 5.0; distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0; showDisabled = 0;
priority = 2; priority = 2;
@ -39,35 +39,35 @@ class Medical {
class PackingBandage: fieldDressing { class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage); displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\packingBandage.paa); icon = QPATHTOF(UI\icons\packingBandage.paa);
}; };
class ElasticBandage: fieldDressing { class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage); displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\bandage.paa); icon = QPATHTOF(UI\icons\bandage.paa);
}; };
class QuikClot: fieldDressing { class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot); displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\bandage.paa); icon = QPATHTOF(UI\icons\bandage.paa);
}; };
class CheckPulse: fieldDressing { class CheckPulse: fieldDressing {
displayName = CSTRING(Actions_CheckPulse); displayName = CSTRING(Actions_CheckPulse);
condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(treatment));
icon = ""; icon = "";
}; };
class CheckBloodPressure: CheckPulse { class CheckBloodPressure: CheckPulse {
displayName = CSTRING(Actions_CheckBloodPressure); displayName = CSTRING(Actions_CheckBloodPressure);
condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(treatment));
}; };
}; };
@ -76,7 +76,7 @@ class Medical {
distance = 5.0; distance = 5.0;
condition = "true"; condition = "true";
runOnHover = 1; runOnHover = 1;
exceptions[] = {"isNotInside", "isNotSitting"}; exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation)); statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation));
modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call FUNC(modifyMedicalAction)); modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call FUNC(modifyMedicalAction));
showDisabled = 1; showDisabled = 1;
@ -87,7 +87,7 @@ class Medical {
displayName = CSTRING(Bandage); displayName = CSTRING(Bandage);
distance = 2.0; distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(treatment));
showDisabled = 1; showDisabled = 1;
priority = 2; priority = 2;
@ -98,7 +98,7 @@ class Medical {
displayName = CSTRING(Actions_TriageCard); displayName = CSTRING(Actions_TriageCard);
distance = 2.0; distance = 2.0;
condition = "true"; condition = "true";
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_2(_target, true)] call DFUNC(displayTriageCard)); statement = QUOTE([ARR_2(_target, true)] call DFUNC(displayTriageCard));
showDisabled = 1; showDisabled = 1;
priority = 2; priority = 2;
@ -110,7 +110,7 @@ class Medical {
displayName = CSTRING(Actions_FieldDressing); displayName = CSTRING(Actions_FieldDressing);
distance = 5.0; distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0; showDisabled = 0;
priority = 2; priority = 2;
@ -119,21 +119,21 @@ class Medical {
class PackingBandage: fieldDressing { class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage); displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\packingBandage.paa); icon = QPATHTOF(UI\icons\packingBandage.paa);
}; };
class ElasticBandage: fieldDressing { class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage); displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\bandage.paa); icon = QPATHTOF(UI\icons\bandage.paa);
}; };
class QuikClot: fieldDressing { class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot); displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\bandage.paa); icon = QPATHTOF(UI\icons\bandage.paa);
}; };
@ -141,7 +141,7 @@ class Medical {
class ACE_ArmLeft { class ACE_ArmLeft {
displayName = ECSTRING(interaction,ArmLeft); displayName = ECSTRING(interaction,ArmLeft);
runOnHover = 1; runOnHover = 1;
exceptions[] = {"isNotInside", "isNotSitting"}; exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation)); statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation));
modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call FUNC(modifyMedicalAction)); modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true"; condition = "true";
@ -151,7 +151,7 @@ class Medical {
displayName = CSTRING(Bandage); displayName = CSTRING(Bandage);
distance = 2.0; distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(treatment));
showDisabled = 1; showDisabled = 1;
priority = 2; priority = 2;
@ -163,7 +163,7 @@ class Medical {
displayName = CSTRING(Actions_FieldDressing); displayName = CSTRING(Actions_FieldDressing);
distance = 5.0; distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0; showDisabled = 0;
priority = 2; priority = 2;
@ -172,83 +172,83 @@ class Medical {
class PackingBandage: fieldDressing { class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage); displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\packingBandage.paa); icon = QPATHTOF(UI\icons\packingBandage.paa);
}; };
class ElasticBandage: fieldDressing { class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage); displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\bandage.paa); icon = QPATHTOF(UI\icons\bandage.paa);
}; };
class QuikClot: fieldDressing { class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot); displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\bandage.paa); icon = QPATHTOF(UI\icons\bandage.paa);
}; };
class Tourniquet: fieldDressing { class Tourniquet: fieldDressing {
displayName = CSTRING(Actions_Tourniquet); displayName = CSTRING(Actions_Tourniquet);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\tourniquet.paa); icon = QPATHTOF(UI\icons\tourniquet.paa);
}; };
class Morphine: fieldDressing { class Morphine: fieldDressing {
displayName = CSTRING(Inject_Morphine); displayName = CSTRING(Inject_Morphine);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa); icon = QPATHTOF(UI\icons\autoInjector.paa);
}; };
class Adenosine: Morphine { class Adenosine: Morphine {
displayName = CSTRING(Inject_Atropine); displayName = CSTRING(Inject_Atropine);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa); icon = QPATHTOF(UI\icons\autoInjector.paa);
}; };
class Atropine: Morphine { class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine); displayName = CSTRING(Inject_Atropine);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa); icon = QPATHTOF(UI\icons\autoInjector.paa);
}; };
class Epinephrine: Morphine { class Epinephrine: Morphine {
displayName = CSTRING(Inject_Epinephrine); displayName = CSTRING(Inject_Epinephrine);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa); icon = QPATHTOF(UI\icons\autoInjector.paa);
}; };
class CheckPulse: fieldDressing { class CheckPulse: fieldDressing {
displayName = CSTRING(Actions_CheckPulse); displayName = CSTRING(Actions_CheckPulse);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(treatment));
icon = ""; icon = "";
}; };
class CheckBloodPressure: CheckPulse { class CheckBloodPressure: CheckPulse {
displayName = CSTRING(Actions_CheckBloodPressure); displayName = CSTRING(Actions_CheckBloodPressure);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(treatment));
}; };
class RemoveTourniquet: Tourniquet { class RemoveTourniquet: Tourniquet {
displayName = CSTRING(Actions_RemoveTourniquet); displayName = CSTRING(Actions_RemoveTourniquet);
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(treatment));
}; };
}; };
class ACE_ArmRight { class ACE_ArmRight {
displayName = ECSTRING(interaction,ArmRight); displayName = ECSTRING(interaction,ArmRight);
runOnHover = 1; runOnHover = 1;
exceptions[] = {"isNotInside", "isNotSitting"}; exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation)); statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation));
modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call FUNC(modifyMedicalAction)); modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call FUNC(modifyMedicalAction));
condition = "true"; condition = "true";
@ -258,7 +258,7 @@ class Medical {
displayName = CSTRING(Bandage); displayName = CSTRING(Bandage);
distance = 2.0; distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment));
showDisabled = 1; showDisabled = 1;
priority = 2; priority = 2;
@ -270,7 +270,7 @@ class Medical {
displayName = CSTRING(Actions_FieldDressing); displayName = CSTRING(Actions_FieldDressing);
distance = 5.0; distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0; showDisabled = 0;
priority = 2; priority = 2;
@ -279,72 +279,72 @@ class Medical {
class PackingBandage: fieldDressing { class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage); displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\packingBandage.paa); icon = QPATHTOF(UI\icons\packingBandage.paa);
}; };
class ElasticBandage: fieldDressing { class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage); displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(treatment));
}; };
class QuikClot: fieldDressing { class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot); displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(treatment));
}; };
class Tourniquet: fieldDressing { class Tourniquet: fieldDressing {
displayName = CSTRING(Actions_Tourniquet); displayName = CSTRING(Actions_Tourniquet);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\tourniquet.paa); icon = QPATHTOF(UI\icons\tourniquet.paa);
}; };
class Morphine: fieldDressing { class Morphine: fieldDressing {
displayName = CSTRING(Inject_Morphine); displayName = CSTRING(Inject_Morphine);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa); icon = QPATHTOF(UI\icons\autoInjector.paa);
}; };
class Adenosine: Morphine { class Adenosine: Morphine {
displayName = CSTRING(Inject_Adenosine); displayName = CSTRING(Inject_Adenosine);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa); icon = QPATHTOF(UI\icons\autoInjector.paa);
}; };
class Atropine: Morphine { class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine); displayName = CSTRING(Inject_Atropine);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(treatment));
}; };
class Epinephrine: Morphine { class Epinephrine: Morphine {
displayName = CSTRING(Inject_Epinephrine); displayName = CSTRING(Inject_Epinephrine);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(treatment));
}; };
class CheckPulse: fieldDressing { class CheckPulse: fieldDressing {
displayName = CSTRING(Actions_CheckPulse); displayName = CSTRING(Actions_CheckPulse);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(treatment));
icon = ""; icon = "";
}; };
class CheckBloodPressure: CheckPulse { class CheckBloodPressure: CheckPulse {
displayName = CSTRING(Actions_CheckBloodPressure); displayName = CSTRING(Actions_CheckBloodPressure);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(treatment));
}; };
class RemoveTourniquet: Tourniquet { class RemoveTourniquet: Tourniquet {
displayName = CSTRING(Actions_RemoveTourniquet); displayName = CSTRING(Actions_RemoveTourniquet);
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(treatment));
}; };
}; };
@ -361,7 +361,7 @@ class Medical {
displayName = CSTRING(Bandage); displayName = CSTRING(Bandage);
distance = 2.0; distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(treatment));
showDisabled = 1; showDisabled = 1;
priority = 2; priority = 2;
@ -374,7 +374,7 @@ class Medical {
displayName = CSTRING(Actions_FieldDressing); displayName = CSTRING(Actions_FieldDressing);
distance = 5.0; distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0; showDisabled = 0;
priority = 2; priority = 2;
@ -383,60 +383,60 @@ class Medical {
class PackingBandage: fieldDressing { class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage); displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\packingBandage.paa); icon = QPATHTOF(UI\icons\packingBandage.paa);
}; };
class ElasticBandage: fieldDressing { class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage); displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(treatment));
}; };
class QuikClot: fieldDressing { class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot); displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(treatment));
}; };
class Tourniquet: fieldDressing { class Tourniquet: fieldDressing {
displayName = CSTRING(Actions_Tourniquet); displayName = CSTRING(Actions_Tourniquet);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\tourniquet.paa); icon = QPATHTOF(UI\icons\tourniquet.paa);
}; };
class Morphine: fieldDressing { class Morphine: fieldDressing {
displayName = CSTRING(Inject_Morphine); displayName = CSTRING(Inject_Morphine);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa); icon = QPATHTOF(UI\icons\autoInjector.paa);
}; };
class Adenosine: Morphine { class Adenosine: Morphine {
displayName = CSTRING(Inject_Atropine); displayName = CSTRING(Inject_Atropine);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa); icon = QPATHTOF(UI\icons\autoInjector.paa);
}; };
class Atropine: Morphine { class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine); displayName = CSTRING(Inject_Atropine);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa); icon = QPATHTOF(UI\icons\autoInjector.paa);
}; };
class Epinephrine: Morphine { class Epinephrine: Morphine {
displayName = CSTRING(Inject_Epinephrine); displayName = CSTRING(Inject_Epinephrine);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(treatment));
}; };
class RemoveTourniquet: Tourniquet { class RemoveTourniquet: Tourniquet {
displayName = CSTRING(Actions_RemoveTourniquet); displayName = CSTRING(Actions_RemoveTourniquet);
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(treatment));
}; };
}; };
@ -453,7 +453,7 @@ class Medical {
displayName = CSTRING(Bandage); displayName = CSTRING(Bandage);
distance = 2.0; distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(treatment));
showDisabled = 1; showDisabled = 1;
priority = 2; priority = 2;
@ -466,7 +466,7 @@ class Medical {
displayName = CSTRING(Actions_FieldDressing); displayName = CSTRING(Actions_FieldDressing);
distance = 5.0; distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0; showDisabled = 0;
priority = 2; priority = 2;
@ -475,59 +475,59 @@ class Medical {
class PackingBandage: fieldDressing { class PackingBandage: fieldDressing {
displayName = CSTRING(Actions_PackingBandage); displayName = CSTRING(Actions_PackingBandage);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\packingBandage.paa); icon = QPATHTOF(UI\icons\packingBandage.paa);
}; };
class ElasticBandage: fieldDressing { class ElasticBandage: fieldDressing {
displayName = CSTRING(Actions_ElasticBandage); displayName = CSTRING(Actions_ElasticBandage);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(treatment));
}; };
class QuikClot: fieldDressing { class QuikClot: fieldDressing {
displayName = CSTRING(Actions_QuikClot); displayName = CSTRING(Actions_QuikClot);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(treatment));
}; };
class Tourniquet: fieldDressing { class Tourniquet: fieldDressing {
displayName = CSTRING(Actions_Tourniquet); displayName = CSTRING(Actions_Tourniquet);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\tourniquet.paa); icon = QPATHTOF(UI\icons\tourniquet.paa);
}; };
class Morphine: fieldDressing { class Morphine: fieldDressing {
displayName = CSTRING(Inject_Morphine); displayName = CSTRING(Inject_Morphine);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa); icon = QPATHTOF(UI\icons\autoInjector.paa);
}; };
class Adenosine: Morphine { class Adenosine: Morphine {
displayName = CSTRING(Inject_Atropine); displayName = CSTRING(Inject_Atropine);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(treatment));
icon = QPATHTOF(UI\icons\autoInjector.paa); icon = QPATHTOF(UI\icons\autoInjector.paa);
}; };
class Atropine: Morphine { class Atropine: Morphine {
displayName = CSTRING(Inject_Atropine); displayName = CSTRING(Inject_Atropine);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(treatment));
}; };
class Epinephrine: Morphine { class Epinephrine: Morphine {
displayName = CSTRING(Inject_Epinephrine); displayName = CSTRING(Inject_Epinephrine);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(treatment));
}; };
class RemoveTourniquet: Tourniquet { class RemoveTourniquet: Tourniquet {
displayName = CSTRING(Actions_RemoveTourniquet); displayName = CSTRING(Actions_RemoveTourniquet);
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(canTreatCached)); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(canTreatCached));
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(treatment)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(treatment));
}; };
}; };

View File

@ -522,7 +522,7 @@ class CfgVehicles {
class ACE_Actions { class ACE_Actions {
// Include actions in body parts for treatment while in the open // Include actions in body parts for treatment while in the open
#define EXCEPTIONS exceptions[] = {}; #define EXCEPTIONS exceptions[] = {"isNotSwimming"};
#define ACTION_CONDITION condition = QUOTE(GVAR(menuTypeStyle) == 0); #define ACTION_CONDITION condition = QUOTE(GVAR(menuTypeStyle) == 0);
#include "ACE_Medical_Actions.hpp" #include "ACE_Medical_Actions.hpp"
@ -538,7 +538,7 @@ class CfgVehicles {
#undef EXCEPTIONS #undef EXCEPTIONS
#undef ACTION_CONDITION #undef ACTION_CONDITION
#define EXCEPTIONS exceptions[] = {"isNotInside"}; #define EXCEPTIONS exceptions[] = {"isNotInside", "isNotSwimming"};
#define ACTION_CONDITION condition = "true"; #define ACTION_CONDITION condition = "true";
#include "ACE_Medical_Actions.hpp" #include "ACE_Medical_Actions.hpp"
}; };
@ -550,7 +550,7 @@ class CfgVehicles {
showDisabled = 0; showDisabled = 0;
priority = 2; priority = 2;
icon = QPATHTOF(UI\icons\medical_cross.paa); icon = QPATHTOF(UI\icons\medical_cross.paa);
exceptions[] = {"isNotDragging", "isNotCarrying"}; exceptions[] = {"isNotDragging", "isNotCarrying", "isNotSwimming"};
}; };
class GVAR(UnLoadPatient) { class GVAR(UnLoadPatient) {
displayName = CSTRING(UnloadPatient); displayName = CSTRING(UnloadPatient);
@ -560,7 +560,7 @@ class CfgVehicles {
showDisabled = 0; showDisabled = 0;
priority = 2; priority = 2;
icon = QPATHTOF(UI\icons\medical_cross.paa); icon = QPATHTOF(UI\icons\medical_cross.paa);
exceptions[] = {"isNotDragging", "isNotCarrying", "isNotInside"}; exceptions[] = {"isNotDragging", "isNotCarrying", "isNotInside", "isNotSwimming"};
}; };
}; };
}; };

View File

@ -176,6 +176,8 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then {
_caller selectWeapon (primaryWeapon _caller); // unit always has a primary weapon here _caller selectWeapon (primaryWeapon _caller); // unit always has a primary weapon here
}; };
if (!underwater _caller) then {
// Weapon on back also does not work underwater
if (isWeaponDeployed _caller) then { if (isWeaponDeployed _caller) then {
TRACE_1("Weapon Deployed, breaking out first",(stance _caller)); TRACE_1("Weapon Deployed, breaking out first",(stance _caller));
[_caller, "", 0] call EFUNC(common,doAnimation); [_caller, "", 0] call EFUNC(common,doAnimation);
@ -191,6 +193,7 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then {
_caller setVariable [QGVAR(treatmentPrevAnimCaller), animationState _caller]; _caller setVariable [QGVAR(treatmentPrevAnimCaller), animationState _caller];
}; };
[_caller, _callerAnim] call EFUNC(common,doAnimation); [_caller, _callerAnim] call EFUNC(common,doAnimation);
};
}; };
//Get treatment time //Get treatment time
@ -220,7 +223,7 @@ private _treatmentTime = if (isNumber (_config >> "treatmentTime")) then {
DFUNC(treatment_failure), DFUNC(treatment_failure),
getText (_config >> "displayNameProgress"), getText (_config >> "displayNameProgress"),
_callbackProgress, _callbackProgress,
["isnotinside"] ["isNotInside", "isNotSwimming"]
] call EFUNC(common,progressBar); ] call EFUNC(common,progressBar);
// Display Icon // Display Icon

View File

@ -26,7 +26,7 @@ _args params ["_caller", "_target", "_selectionName", "_className", "_items", "_
if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
_caller removeWeapon "ACE_FakePrimaryWeapon"; _caller removeWeapon "ACE_FakePrimaryWeapon";
}; };
if (vehicle _caller == _caller) then { if (vehicle _caller == _caller && {!underwater _caller}) then {
private _lastAnim = _caller getVariable [QGVAR(treatmentPrevAnimCaller), ""]; private _lastAnim = _caller getVariable [QGVAR(treatmentPrevAnimCaller), ""];
//Don't play another medic animation (when player is rapidily treating) //Don't play another medic animation (when player is rapidily treating)
TRACE_2("Reseting to old animation", animationState player, _lastAnim); TRACE_2("Reseting to old animation", animationState player, _lastAnim);
@ -37,7 +37,6 @@ if (vehicle _caller == _caller) then {
case "ainvppnemstpslaywpstdnon_medic": {_lastAnim = "AinvPpneMstpSlayWpstDnon"}; case "ainvppnemstpslaywpstdnon_medic": {_lastAnim = "AinvPpneMstpSlayWpstDnon"};
case "ainvpknlmstpslaywpstdnon_medic": {_lastAnim = "AmovPknlMstpSrasWpstDnon"}; case "ainvpknlmstpslaywpstdnon_medic": {_lastAnim = "AmovPknlMstpSrasWpstDnon"};
}; };
[_caller, _lastAnim, 2] call EFUNC(common,doAnimation); [_caller, _lastAnim, 2] call EFUNC(common,doAnimation);
}; };
_caller setVariable [QGVAR(treatmentPrevAnimCaller), nil]; _caller setVariable [QGVAR(treatmentPrevAnimCaller), nil];

View File

@ -26,7 +26,7 @@ _args params ["_caller", "_target", "_selectionName", "_className", "_items", "_
if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
_caller removeWeapon "ACE_FakePrimaryWeapon"; _caller removeWeapon "ACE_FakePrimaryWeapon";
}; };
if (vehicle _caller == _caller) then { if (vehicle _caller == _caller && {!underwater _caller}) then {
private _lastAnim = _caller getVariable [QGVAR(treatmentPrevAnimCaller), ""]; private _lastAnim = _caller getVariable [QGVAR(treatmentPrevAnimCaller), ""];
//Don't play another medic animation (when player is rapidily treating) //Don't play another medic animation (when player is rapidily treating)
TRACE_2("Reseting to old animation", animationState player, _lastAnim); TRACE_2("Reseting to old animation", animationState player, _lastAnim);
@ -37,7 +37,6 @@ if (vehicle _caller == _caller) then {
case "ainvppnemstpslaywpstdnon_medic": {_lastAnim = "AinvPpneMstpSlayWpstDnon"}; case "ainvppnemstpslaywpstdnon_medic": {_lastAnim = "AinvPpneMstpSlayWpstDnon"};
case "ainvpknlmstpslaywpstdnon_medic": {_lastAnim = "AmovPknlMstpSrasWpstDnon"}; case "ainvpknlmstpslaywpstdnon_medic": {_lastAnim = "AmovPknlMstpSrasWpstDnon"};
}; };
[_caller, _lastAnim, 2] call EFUNC(common,doAnimation); [_caller, _lastAnim, 2] call EFUNC(common,doAnimation);
}; };
_caller setVariable [QGVAR(treatmentPrevAnimCaller), nil]; _caller setVariable [QGVAR(treatmentPrevAnimCaller), nil];

View File

@ -47,7 +47,7 @@ class CfgVehicles {
class Medical_Menu { class Medical_Menu {
displayName = CSTRING(OpenMenu); displayName = CSTRING(OpenMenu);
runOnHover = 0; runOnHover = 0;
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
condition = QUOTE([ARR_2(ACE_player,_target)] call FUNC(canOpenMenu)); condition = QUOTE([ARR_2(ACE_player,_target)] call FUNC(canOpenMenu));
statement = QUOTE([_target] call DFUNC(openMenu)); statement = QUOTE([_target] call DFUNC(openMenu));
icon = QPATHTOEF(medical,UI\icons\medical_cross.paa); icon = QPATHTOEF(medical,UI\icons\medical_cross.paa);
@ -60,7 +60,7 @@ class CfgVehicles {
class Medical_Menu { class Medical_Menu {
displayName = CSTRING(OpenMenu); displayName = CSTRING(OpenMenu);
runOnHover = 0; runOnHover = 0;
exceptions[] = {"isNotInside"}; exceptions[] = {"isNotInside", "isNotSwimming"};
condition = QUOTE([ARR_2(ACE_player,_target)] call FUNC(canOpenMenu)); condition = QUOTE([ARR_2(ACE_player,_target)] call FUNC(canOpenMenu));
statement = QUOTE([_target] call DFUNC(openMenu)); statement = QUOTE([_target] call DFUNC(openMenu));
icon = QPATHTOEF(medical,UI\icons\medical_cross.paa); icon = QPATHTOEF(medical,UI\icons\medical_cross.paa);

View File

@ -21,7 +21,7 @@ GVAR(pendingReopen) = false;
if (!((_target isKindOf "CAManBase") && {[ACE_player, _target] call FUNC(canOpenMenu)})) then {_target = ACE_player}; if (!((_target isKindOf "CAManBase") && {[ACE_player, _target] call FUNC(canOpenMenu)})) then {_target = ACE_player};
// Conditions: canInteract // Conditions: canInteract
if !([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; if !([ACE_player, _target, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
if !([ACE_player, _target] call FUNC(canOpenMenu)) exitWith {false}; if !([ACE_player, _target] call FUNC(canOpenMenu)) exitWith {false};
// Statement // Statement

View File

@ -19,7 +19,7 @@
params ["_player", "_target", "_name"]; params ["_player", "_target", "_name"];
if (!([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith))) exitWith {[]}; if (!([ACE_player, _target, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith))) exitWith {[]};
private _actions = if (EGVAR(medical,level) == 2) then { private _actions = if (EGVAR(medical,level) == 2) then {
GVAR(actionsAdvanced); GVAR(actionsAdvanced);

View File

@ -34,7 +34,7 @@ if (_name isEqualTo "toggle") exitWith {
_newTarget = ACE_player; _newTarget = ACE_player;
//If we are on the player, and only if our old target is still valid, switch to it: //If we are on the player, and only if our old target is still valid, switch to it:
if ((GVAR(INTERACTION_TARGET) == ACE_player) && if ((GVAR(INTERACTION_TARGET) == ACE_player) &&
{[ACE_player, GVAR(INTERACTION_TARGET_PREVIOUS), ["isNotInside"]] call EFUNC(common,canInteractWith)} && {[ACE_player, GVAR(INTERACTION_TARGET_PREVIOUS), ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)} &&
{[ACE_player, GVAR(INTERACTION_TARGET_PREVIOUS)] call FUNC(canOpenMenu)}) then { {[ACE_player, GVAR(INTERACTION_TARGET_PREVIOUS)] call FUNC(canOpenMenu)}) then {
_newTarget = GVAR(INTERACTION_TARGET_PREVIOUS); _newTarget = GVAR(INTERACTION_TARGET_PREVIOUS);
}; };

View File

@ -75,7 +75,7 @@ GVAR(MenuPFHID) = [{
[GVAR(LatestDisplayOptionMenu)] call FUNC(handleUI_DisplayOptions); [GVAR(LatestDisplayOptionMenu)] call FUNC(handleUI_DisplayOptions);
//Check that it's valid to stay open: //Check that it's valid to stay open:
if !(([ACE_player, GVAR(INTERACTION_TARGET), ["isNotInside"]] call EFUNC(common,canInteractWith)) && {[ACE_player, GVAR(INTERACTION_TARGET)] call FUNC(canOpenMenu)}) then { if !(([ACE_player, GVAR(INTERACTION_TARGET), ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) && {[ACE_player, GVAR(INTERACTION_TARGET)] call FUNC(canOpenMenu)}) then {
closeDialog 314412; closeDialog 314412;
//If we failed because of distance check, show UI message: //If we failed because of distance check, show UI message:
if ((ACE_player distance GVAR(INTERACTION_TARGET)) > GVAR(maxRange)) then { if ((ACE_player distance GVAR(INTERACTION_TARGET)) > GVAR(maxRange)) then {

View File

@ -7,7 +7,7 @@ class CfgVehicles {
class GVAR(UnJam) { class GVAR(UnJam) {
displayName = CSTRING(UnjamWeapon); displayName = CSTRING(UnjamWeapon);
condition = QUOTE( GVAR(enabled) && {[_player] call FUNC(canUnjam)} ); condition = QUOTE( GVAR(enabled) && {[_player] call FUNC(canUnjam)} );
exceptions[] = {"isNotInside", "isNotSitting"}; exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE( [ARR_2(_player, currentMuzzle _player)] call FUNC(clearJam); ); statement = QUOTE( [ARR_2(_player, currentMuzzle _player)] call FUNC(clearJam); );
showDisabled = 0; showDisabled = 0;
priority = 4; priority = 4;
@ -16,6 +16,7 @@ class CfgVehicles {
class GVAR(SwapBarrel) { class GVAR(SwapBarrel) {
displayName = CSTRING(SwapBarrel); displayName = CSTRING(SwapBarrel);
condition = QUOTE( [ARR_2(_player, currentWeapon _player)] call FUNC(canSwapBarrel) ); condition = QUOTE( [ARR_2(_player, currentWeapon _player)] call FUNC(canSwapBarrel) );
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE( [ARR_3(_player, _player, currentWeapon _player)] call FUNC(swapBarrel); ); statement = QUOTE( [ARR_3(_player, _player, currentWeapon _player)] call FUNC(swapBarrel); );
showDisabled = 0; showDisabled = 0;
priority = 3; priority = 3;
@ -24,7 +25,7 @@ class CfgVehicles {
class GVAR(CheckTemperature) { class GVAR(CheckTemperature) {
displayName = CSTRING(CheckTemperatureShort); displayName = CSTRING(CheckTemperatureShort);
condition = QUOTE( GVAR(enabled) && {switch (currentWeapon _player) do {case (''): {false}; case (primaryWeapon _player); case (handgunWeapon _player): {true}; default {false}}} ); condition = QUOTE( GVAR(enabled) && {switch (currentWeapon _player) do {case (''): {false}; case (primaryWeapon _player); case (handgunWeapon _player): {true}; default {false}}} );
exceptions[] = {"isNotInside", "isNotSitting"}; exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE( [ARR_3(_player, _player, currentWeapon _player)] call FUNC(checkTemperature); ); statement = QUOTE( [ARR_3(_player, _player, currentWeapon _player)] call FUNC(checkTemperature); );
showDisabled = 0; showDisabled = 0;
priority = 2.9; priority = 2.9;
@ -33,7 +34,7 @@ class CfgVehicles {
class GVAR(CheckTemperatureSpareBarrels) { class GVAR(CheckTemperatureSpareBarrels) {
displayName = CSTRING(CheckTemperatureSpareBarrelsShort); displayName = CSTRING(CheckTemperatureSpareBarrelsShort);
condition = QUOTE((_player) call FUNC(canCheckSpareBarrelsTemperatures) ); condition = QUOTE((_player) call FUNC(canCheckSpareBarrelsTemperatures) );
exceptions[] = {"isNotInside", "isNotSitting"}; exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE( [_player] call FUNC(checkSpareBarrelsTemperatures); ); statement = QUOTE( [_player] call FUNC(checkSpareBarrelsTemperatures); );
showDisabled = 0; showDisabled = 0;
priority = 2.8; priority = 2.8;
@ -48,12 +49,13 @@ class CfgVehicles {
displayName = CSTRING(SwapBarrel); displayName = CSTRING(SwapBarrel);
condition = QUOTE( [ARR_2(_player, currentWeapon _target)] call FUNC(canSwapBarrel) ); condition = QUOTE( [ARR_2(_player, currentWeapon _target)] call FUNC(canSwapBarrel) );
statement = QUOTE([ARR_3(_player, _target, currentWeapon _target)] call FUNC(swapBarrelAssistant);); statement = QUOTE([ARR_3(_player, _target, currentWeapon _target)] call FUNC(swapBarrelAssistant););
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
icon = QUOTE(PATHTOF(UI\spare_barrel_ca.paa)); icon = QUOTE(PATHTOF(UI\spare_barrel_ca.paa));
}; };
class GVAR(CheckTemperature) { class GVAR(CheckTemperature) {
displayName = CSTRING(CheckTemperatureShort); displayName = CSTRING(CheckTemperatureShort);
condition = QUOTE( GVAR(enabled) && {switch (currentWeapon _target) do {case (''): {false}; case (primaryWeapon _target); case (handgunWeapon _target): {true}; default {false}}} ); condition = QUOTE( GVAR(enabled) && {switch (currentWeapon _target) do {case (''): {false}; case (primaryWeapon _target); case (handgunWeapon _target): {true}; default {false}}} );
exceptions[] = {"isNotInside", "isNotSitting"}; exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE( [ARR_3(_player, _target, currentWeapon _target)] call FUNC(checkTemperature); ); statement = QUOTE( [ARR_3(_player, _target, currentWeapon _target)] call FUNC(checkTemperature); );
icon = QUOTE(PATHTOF(UI\temp_ca.paa)); icon = QUOTE(PATHTOF(UI\temp_ca.paa));
}; };

View File

@ -18,9 +18,6 @@
params ["_player"]; params ["_player"];
// Check canInteractWith:
if (!([_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith {};
// Make the unit go kneeling // Make the unit go kneeling
[_player] call EFUNC(common,goKneeling); [_player] call EFUNC(common,goKneeling);
@ -37,5 +34,5 @@ if (!([_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canI
{}, {},
(localize LSTRING(CheckingSpareBarrelsTemperatures)), (localize LSTRING(CheckingSpareBarrelsTemperatures)),
{true}, {true},
["isNotInside", "isNotSitting"] ["isNotInside", "isNotSitting", "isNotSwimming"]
] call EFUNC(common,progressBar); ] call EFUNC(common,progressBar);

View File

@ -34,4 +34,4 @@ if (_assistant isEqualTo _gunner) then {
_duration = 5.0; _duration = 5.0;
}; };
[_duration, [_assistant,_gunner,_weapon], {(_this select 0) call FUNC(swapBarrelCallback)}, {}, (localize LSTRING(SwappingBarrel))] call EFUNC(common,progressBar); [_duration, [_assistant,_gunner,_weapon], {(_this select 0) call FUNC(swapBarrelCallback)}, {}, localize LSTRING(SwappingBarrel), nil, ["isNotInside", "isNotSitting", "isNotSwimming"]] call EFUNC(common,progressBar);

View File

@ -28,6 +28,6 @@ if (stance _assistant != "PRONE") then {
// Barrel dismount gesture // Barrel dismount gesture
playSound "ACE_BarrelSwap"; playSound "ACE_BarrelSwap";
[3, [_assistant, _gunner, _weapon], {}, {}, (localize LSTRING(SwappingBarrel))] call EFUNC(common,progressBar); [3, [_assistant, _gunner, _weapon], {}, {}, localize LSTRING(SwappingBarrel), nil, ["isNotInside", "isNotSitting", "isNotSwimming"]] call EFUNC(common,progressBar);
[QGVAR(initiateSwapBarrelAssisted), [_assistant, _gunner, _weapon], _gunner] call CBA_fnc_targetEvent; [QGVAR(initiateSwapBarrelAssisted), [_assistant, _gunner, _weapon], _gunner] call CBA_fnc_targetEvent;

View File

@ -8,12 +8,14 @@ class CfgVehicles {
distance = 2.0; distance = 2.0;
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(getAmmoToLinkBelt)) > 0); condition = QUOTE(([ARR_2(_player, _target)] call FUNC(getAmmoToLinkBelt)) > 0);
statement = QUOTE([ARR_2(_player, _target)] call FUNC(startLinkingBelt)); statement = QUOTE([ARR_2(_player, _target)] call FUNC(startLinkingBelt));
exceptions[] = {"isNotInside"};
}; };
class GVAR(CheckAmmo) { class GVAR(CheckAmmo) {
displayName = CSTRING(checkAmmo); displayName = CSTRING(checkAmmo);
distance = 2.0; distance = 2.0;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canCheckAmmo)); condition = QUOTE([ARR_2(_player, _target)] call FUNC(canCheckAmmo));
statement = QUOTE([ARR_2(_player, _target)] call FUNC(checkAmmo)); statement = QUOTE([ARR_2(_player, _target)] call FUNC(checkAmmo));
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
}; };
}; };
}; };
@ -28,6 +30,7 @@ class CfgVehicles {
distance = 2.0; distance = 2.0;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canCheckAmmo)); condition = QUOTE([ARR_2(_player, _target)] call FUNC(canCheckAmmo));
statement = QUOTE([ARR_2(_player, _target)] call FUNC(checkAmmo)); statement = QUOTE([ARR_2(_player, _target)] call FUNC(checkAmmo));
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
}; };
}; };
}; };

View File

@ -6,7 +6,7 @@ if (!hasInterface) exitWith {};
// Add keybinds // Add keybinds
["ACE3 Weapons", QGVAR(checkAmmo), localize LSTRING(checkAmmo), { ["ACE3 Weapons", QGVAR(checkAmmo), localize LSTRING(checkAmmo), {
// Conditions: canInteract // Conditions: canInteract
if !([ACE_player, vehicle ACE_player, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false}; if !([ACE_player, vehicle ACE_player, ["isNotInside", "isNotSwimming", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific // Conditions: specific
if !(ACE_player call CBA_fnc_canUseWeapon || {(vehicle ACE_player) isKindOf "StaticWeapon"}) exitWith {false}; if !(ACE_player call CBA_fnc_canUseWeapon || {(vehicle ACE_player) isKindOf "StaticWeapon"}) exitWith {false};

View File

@ -56,4 +56,4 @@ private _onFailure = {
[_player, _magazineType, _maxAmmo] call EFUNC(common,removeSpecificMagazine); [_player, _magazineType, _maxAmmo] call EFUNC(common,removeSpecificMagazine);
// Call progress bar // Call progress bar
[4, [_player, _target, [_magazineType, _maxAmmo]], _onFinish, _onFailure, (localize LSTRING(LinkingBelt)), _condition] call EFUNC(common,progressBar); [4, [_player, _target, [_magazineType, _maxAmmo]], _onFinish, _onFailure, (localize LSTRING(LinkingBelt)), _condition, ["isNotInside"]] call EFUNC(common,progressBar);

View File

@ -8,6 +8,7 @@ class CfgVehicles {
selection = "launcher"; selection = "launcher";
distance = 4; distance = 4;
condition = ""; condition = "";
exceptions[] = {"isNotInside", "isNotSwimming"};
insertChildren = QUOTE(_this call FUNC(addMissileReloadActions)); insertChildren = QUOTE(_this call FUNC(addMissileReloadActions));
}; };
}; };

View File

@ -23,7 +23,7 @@ TRACE_4("params",_unit,_target,_weapon,_magazine);
if (!alive _target) exitWith {false}; if (!alive _target) exitWith {false};
if (vehicle _target != _target) exitWith {false}; if (vehicle _target != _target) exitWith {false};
if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; if !([_unit, _target, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
// target is awake // target is awake
if (_target getVariable ["ACE_isUnconscious", false]) exitWith {false}; if (_target getVariable ["ACE_isUnconscious", false]) exitWith {false};

View File

@ -48,4 +48,4 @@ _condition = {
(_this select 0) call DFUNC(canLoad) && {(_this select 0 select 0) distance (_this select 0 select 1) < 4} (_this select 0) call DFUNC(canLoad) && {(_this select 0 select 0) distance (_this select 0 select 1) < 4}
}; };
[_reloadTime, [_unit, _target, _weapon, _magazine], _onSuccess, _onFailure, localize LSTRING(LoadingLauncher), _condition] call EFUNC(common,progressBar); [_reloadTime, [_unit, _target, _weapon, _magazine], _onSuccess, _onFailure, localize LSTRING(LoadingLauncher), _condition, ["isNotInside", "isNotSwimming"]] call EFUNC(common,progressBar);

View File

@ -10,7 +10,7 @@
priority = 2; \ priority = 2; \
icon = "\A3\ui_f\data\igui\cfg\actions\repair_ca.paa"; \ icon = "\A3\ui_f\data\igui\cfg\actions\repair_ca.paa"; \
distance = 4; \ distance = 4; \
exceptions[] = {"isNotOnLadder"}; \ exceptions[] = {"isNotSwimming", "isNotOnLadder"}; \
}; \ }; \
}; \ }; \
}; };

View File

@ -23,7 +23,7 @@ params ["_caller", "_target", "_hitPointIndex"];
(getAllHitPointsDamage _target) params ["_allHitPoints", "", "_allHitPointDamages"]; (getAllHitPointsDamage _target) params ["_allHitPoints", "", "_allHitPointDamages"];
if !([_caller, _target, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {false}; if !([_caller, _target, ["isNotDragging", "isNotCarrying", "isNotSwimming", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Get hitpoint groups if available // Get hitpoint groups if available
_hitpointGroupConfig = configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(hitpointGroups); _hitpointGroupConfig = configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(hitpointGroups);

View File

@ -169,12 +169,14 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then {
_caller selectWeapon (primaryWeapon _caller); // unit always has a primary weapon here _caller selectWeapon (primaryWeapon _caller); // unit always has a primary weapon here
}; };
if (!underwater _caller) then {
if (stance _caller == "STAND") then { if (stance _caller == "STAND") then {
_caller setVariable [QGVAR(repairPrevAnimCaller), "amovpknlmstpsraswrfldnon"]; _caller setVariable [QGVAR(repairPrevAnimCaller), "amovpknlmstpsraswrfldnon"];
} else { } else {
_caller setVariable [QGVAR(repairPrevAnimCaller), animationState _caller]; _caller setVariable [QGVAR(repairPrevAnimCaller), animationState _caller];
}; };
[_caller, _callerAnim] call EFUNC(common,doAnimation); [_caller, _callerAnim] call EFUNC(common,doAnimation);
};
}; };
// Get repair time // Get repair time
@ -224,7 +226,7 @@ TRACE_4("display",_hitPoint,_hitPointClassname,_processText,_text);
DFUNC(repair_failure), DFUNC(repair_failure),
_text, _text,
_callbackProgress, _callbackProgress,
["isNotOnLadder"] ["isNotSwimming", "isNotOnLadder"]
] call EFUNC(common,progressBar); ] call EFUNC(common,progressBar);
// Display Icon // Display Icon

View File

@ -31,7 +31,7 @@ private ["_config","_callback", "_usersOfItems", "_weaponSelect"];
if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
_caller removeWeapon "ACE_FakePrimaryWeapon"; _caller removeWeapon "ACE_FakePrimaryWeapon";
}; };
if (vehicle _caller == _caller) then { if (vehicle _caller == _caller && {!underwater _caller}) then {
[_caller, _caller getVariable [QGVAR(repairPrevAnimCaller), ""], 2] call EFUNC(common,doAnimation); [_caller, _caller getVariable [QGVAR(repairPrevAnimCaller), ""], 2] call EFUNC(common,doAnimation);
}; };
_caller setVariable [QGVAR(repairPrevAnimCaller), nil]; _caller setVariable [QGVAR(repairPrevAnimCaller), nil];

View File

@ -31,7 +31,7 @@ private ["_config","_callback", "_weaponSelect"];
if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then { if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
_caller removeWeapon "ACE_FakePrimaryWeapon"; _caller removeWeapon "ACE_FakePrimaryWeapon";
}; };
if (vehicle _caller == _caller) then { if (vehicle _caller == _caller && {!underwater _caller}) then {
[_caller, _caller getVariable [QGVAR(repairPrevAnimCaller), ""], 2] call EFUNC(common,doAnimation); [_caller, _caller getVariable [QGVAR(repairPrevAnimCaller), ""], 2] call EFUNC(common,doAnimation);
}; };
_caller setVariable [QGVAR(repairPrevAnimCaller), nil]; _caller setVariable [QGVAR(repairPrevAnimCaller), nil];

View File

@ -1,4 +1,3 @@
class CBA_Extended_EventHandlers; class CBA_Extended_EventHandlers;
class CfgVehicles { class CfgVehicles {
@ -71,6 +70,7 @@ class CfgVehicles {
displayName = CSTRING(Rallypoint_MoveRallypoint); displayName = CSTRING(Rallypoint_MoveRallypoint);
condition = QUOTE([ARR_2(_player, side group _player)] call FUNC(canMoveRallypoint)); condition = QUOTE([ARR_2(_player, side group _player)] call FUNC(canMoveRallypoint));
statement = QUOTE([ARR_2(_player, side group _player)] call FUNC(moveRallypoint)); statement = QUOTE([ARR_2(_player, side group _player)] call FUNC(moveRallypoint));
exceptions[] = {"isNotSwimming"};
showDisabled = 0; showDisabled = 0;
priority = -0.5; priority = -0.5;
}; };
@ -110,6 +110,7 @@ class CfgVehicles {
distance = 4; distance = 4;
condition = QUOTE(side group _player == west); condition = QUOTE(side group _player == west);
statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_West')] call FUNC(teleportToRallypoint)); statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_West')] call FUNC(teleportToRallypoint));
exceptions[] = {"isNotSwimming"};
position = "[-0.05,-0.35,-2.6]"; position = "[-0.05,-0.35,-2.6]";
showDisabled = 1; showDisabled = 1;
priority = 1; priority = 1;
@ -132,6 +133,7 @@ class CfgVehicles {
distance = 4; distance = 4;
condition = QUOTE(side group _player == east); condition = QUOTE(side group _player == east);
statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_East')] call FUNC(teleportToRallypoint)); statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_East')] call FUNC(teleportToRallypoint));
exceptions[] = {"isNotSwimming"};
position = "[-0.05,-0.35,-2.6]"; position = "[-0.05,-0.35,-2.6]";
showDisabled = 1; showDisabled = 1;
priority = 1; priority = 1;
@ -154,6 +156,7 @@ class CfgVehicles {
distance = 4; distance = 4;
condition = QUOTE(side group _player == independent); condition = QUOTE(side group _player == independent);
statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_Independent')] call FUNC(teleportToRallypoint)); statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_Independent')] call FUNC(teleportToRallypoint));
exceptions[] = {"isNotSwimming"};
position = "[-0.05,-0.35,-2.6]"; position = "[-0.05,-0.35,-2.6]";
showDisabled = 1; showDisabled = 1;
priority = 1; priority = 1;
@ -177,6 +180,7 @@ class CfgVehicles {
distance = 4; distance = 4;
condition = QUOTE(side group _player == west); condition = QUOTE(side group _player == west);
statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_West_Base')] call FUNC(teleportToRallypoint)); statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_West_Base')] call FUNC(teleportToRallypoint));
exceptions[] = {"isNotSwimming"};
position = "[-0.05,-0.35,-2.6]"; position = "[-0.05,-0.35,-2.6]";
showDisabled = 1; showDisabled = 1;
priority = 1; priority = 1;
@ -199,6 +203,7 @@ class CfgVehicles {
distance = 4; distance = 4;
condition = QUOTE(side group _player == east); condition = QUOTE(side group _player == east);
statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_East_Base')] call FUNC(teleportToRallypoint)); statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_East_Base')] call FUNC(teleportToRallypoint));
exceptions[] = {"isNotSwimming"};
position = "[-0.05,-0.35,-2.6]"; position = "[-0.05,-0.35,-2.6]";
showDisabled = 1; showDisabled = 1;
priority = 1; priority = 1;
@ -221,6 +226,7 @@ class CfgVehicles {
distance = 4; distance = 4;
condition = QUOTE(side group _player == independent); condition = QUOTE(side group _player == independent);
statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_Independent_Base')] call FUNC(teleportToRallypoint)); statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_Independent_Base')] call FUNC(teleportToRallypoint));
exceptions[] = {"isNotSwimming"};
position = "[-0.05,-0.35,-2.6]"; position = "[-0.05,-0.35,-2.6]";
showDisabled = 1; showDisabled = 1;
priority = 1; priority = 1;

View File

@ -11,7 +11,7 @@ if (!hasInterface) exitWith {};
["ACE3 Weapons", QGVAR(safeMode), localize LSTRING(SafeMode), ["ACE3 Weapons", QGVAR(safeMode), localize LSTRING(SafeMode),
{ {
// Conditions: canInteract // Conditions: canInteract
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific // Conditions: specific
if !([ACE_player] call CBA_fnc_canUseWeapon && {currentWeapon ACE_player != binocular ACE_player} && {currentWeapon ACE_player != ""}) exitWith {false}; if !([ACE_player] call CBA_fnc_canUseWeapon && {currentWeapon ACE_player != binocular ACE_player} && {currentWeapon ACE_player != ""}) exitWith {false};

View File

@ -11,7 +11,7 @@ class CfgVehicles {
showDisabled = 0; showDisabled = 0;
priority = 0.2; priority = 0.2;
//icon = QPATHTOF(UI\...); // TODO //icon = QPATHTOF(UI\...); // TODO
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; exceptions[] = {"notOnMap", "isNotInside", "isNotSwimming", "isNotSitting"};
}; };
}; };
}; };

View File

@ -45,7 +45,7 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]];
// Add keybinds // Add keybinds
["ACE3 Scope Adjustment", QGVAR(AdjustUpMinor), localize LSTRING(AdjustUpMinor), { ["ACE3 Scope Adjustment", QGVAR(AdjustUpMinor), localize LSTRING(AdjustUpMinor), {
// Conditions: canInteract // Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific // Conditions: specific
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
@ -57,7 +57,7 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]];
["ACE3 Scope Adjustment", QGVAR(AdjustDownMinor), localize LSTRING(AdjustDownMinor), { ["ACE3 Scope Adjustment", QGVAR(AdjustDownMinor), localize LSTRING(AdjustDownMinor), {
// Conditions: canInteract // Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific // Conditions: specific
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
@ -69,7 +69,7 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]];
["ACE3 Scope Adjustment", QGVAR(AdjustLeftMinor), localize LSTRING(AdjustLeftMinor), { ["ACE3 Scope Adjustment", QGVAR(AdjustLeftMinor), localize LSTRING(AdjustLeftMinor), {
// Conditions: canInteract // Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific // Conditions: specific
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
@ -81,7 +81,7 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]];
["ACE3 Scope Adjustment", QGVAR(AdjustRightMinor), localize LSTRING(AdjustRightMinor), { ["ACE3 Scope Adjustment", QGVAR(AdjustRightMinor), localize LSTRING(AdjustRightMinor), {
// Conditions: canInteract // Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific // Conditions: specific
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
@ -93,7 +93,7 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]];
["ACE3 Scope Adjustment", QGVAR(AdjustUpMajor), localize LSTRING(AdjustUpMajor), { ["ACE3 Scope Adjustment", QGVAR(AdjustUpMajor), localize LSTRING(AdjustUpMajor), {
// Conditions: canInteract // Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific // Conditions: specific
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
@ -105,7 +105,7 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]];
["ACE3 Scope Adjustment", QGVAR(AdjustDownMajor), localize LSTRING(AdjustDownMajor), { ["ACE3 Scope Adjustment", QGVAR(AdjustDownMajor), localize LSTRING(AdjustDownMajor), {
// Conditions: canInteract // Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific // Conditions: specific
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
@ -117,7 +117,7 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]];
["ACE3 Scope Adjustment", QGVAR(AdjustLeftMajor), localize LSTRING(AdjustLeftMajor), { ["ACE3 Scope Adjustment", QGVAR(AdjustLeftMajor), localize LSTRING(AdjustLeftMajor), {
// Conditions: canInteract // Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific // Conditions: specific
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
@ -129,7 +129,7 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]];
["ACE3 Scope Adjustment", QGVAR(AdjustRightMajor), localize LSTRING(AdjustRightMajor), { ["ACE3 Scope Adjustment", QGVAR(AdjustRightMajor), localize LSTRING(AdjustRightMajor), {
// Conditions: canInteract // Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; if !([ACE_player, objNull, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific // Conditions: specific
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};

View File

@ -28,6 +28,7 @@
distance = 4; \ distance = 4; \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(2,3)]}); \ condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(2,3)]}); \
statement = QUOTE([ARR_3(QUOTE(QGVAR(setVehicleLock)), [ARR_2(_target,false)], [_target])] call CBA_fnc_targetEvent); \ statement = QUOTE([ARR_3(QUOTE(QGVAR(setVehicleLock)), [ARR_2(_target,false)], [_target])] call CBA_fnc_targetEvent); \
exceptions[] = {"isNotSwimming"}; \
priority = 0.3; \ priority = 0.3; \
icon = QPATHTOF(UI\key_menuIcon_ca.paa); \ icon = QPATHTOF(UI\key_menuIcon_ca.paa); \
}; \ }; \
@ -36,6 +37,7 @@
distance = 4; \ distance = 4; \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(0,1)]}); \ condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(0,1)]}); \
statement = QUOTE([ARR_3(QUOTE(QGVAR(setVehicleLock)), [ARR_2(_target,true)], [_target])] call CBA_fnc_targetEvent); \ statement = QUOTE([ARR_3(QUOTE(QGVAR(setVehicleLock)), [ARR_2(_target,true)], [_target])] call CBA_fnc_targetEvent); \
exceptions[] = {"isNotSwimming"}; \
priority = 0.2; \ priority = 0.2; \
icon = QPATHTOF(UI\key_menuIcon_ca.paa); \ icon = QPATHTOF(UI\key_menuIcon_ca.paa); \
}; \ }; \
@ -44,6 +46,7 @@
distance = 4; \ distance = 4; \
condition = QUOTE([ARR_3(_player, _target, 'canLockpick')] call FUNC(lockpick)); \ condition = QUOTE([ARR_3(_player, _target, 'canLockpick')] call FUNC(lockpick)); \
statement = QUOTE([ARR_3(_player, _target, 'startLockpick')] call FUNC(lockpick)); \ statement = QUOTE([ARR_3(_player, _target, 'startLockpick')] call FUNC(lockpick)); \
exceptions[] = {"isNotSwimming"}; \
priority = 0.1; \ priority = 0.1; \
}; \ }; \
}; \ }; \
@ -61,6 +64,13 @@ class CfgVehicles {
class Helicopter: Air { class Helicopter: Air {
MACRO_LOCK_ACTIONS MACRO_LOCK_ACTIONS
}; };
class Motorcycle: LandVehicle {
MACRO_LOCK_ACTIONS
};
class Ship;
class Ship_F: Ship {
MACRO_LOCK_ACTIONS
};
class Logic; class Logic;
class Module_F: Logic { class Module_F: Logic {

View File

@ -55,7 +55,7 @@ switch (_funcType) do {
_returnValue = !([_unit, _veh] call FUNC(hasKeyForVehicle)) && {(locked _veh) in [2, 3]}; _returnValue = !([_unit, _veh] call FUNC(hasKeyForVehicle)) && {(locked _veh) in [2, 3]};
}; };
case "startLockpick": { case "startLockpick": {
[_vehLockpickStrenth, [_unit, _veh, "finishLockpick"], {(_this select 0) call FUNC(lockpick)}, {}, (localize LSTRING(Action_LockpickInUse)), _condition, ["isNotInside"]] call EFUNC(common,progressBar); [_vehLockpickStrenth, [_unit, _veh, "finishLockpick"], {(_this select 0) call FUNC(lockpick)}, {}, (localize LSTRING(Action_LockpickInUse)), _condition, ["isNotInside", "isNotSwimming"]] call EFUNC(common,progressBar);
}; };
case "finishLockpick": { case "finishLockpick": {
[QGVAR(setVehicleLock), [_veh, false], [_veh]] call CBA_fnc_targetEvent; [QGVAR(setVehicleLock), [_veh, false], [_veh]] call CBA_fnc_targetEvent;

View File

@ -15,7 +15,7 @@ GVAR(isSpeedLimiter) = false;
true true
} else { } else {
// Conditions: canInteract // Conditions: canInteract
if !([ACE_player, objNull, ["isnotinside"]] call EFUNC(common,canInteractWith)) exitWith {false}; if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific // Conditions: specific
if !(ACE_player == driver vehicle ACE_player && if !(ACE_player == driver vehicle ACE_player &&
{vehicle ACE_player isKindOf 'Car' || {vehicle ACE_player isKindOf 'Car' ||