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);
condition = QUOTE([ARR_2(_player,true)] call FUNC(canPrepare));
statement = QUOTE(_this call FUNC(pickUp));
exceptions[] = {"isNotSwimming"};
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";
};

View File

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

View File

@ -32,5 +32,5 @@ GVAR(enabled) &&
#endif
{!(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

View File

@ -128,6 +128,10 @@ _activeThrowable setDir (_unitDirVisual + 90);
private _pitch = [-30, -90] select (_throwType == "high");
[_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 {
_posFin = _posFin vectorAdd (AGLToASL (positionCameraToWorld [_leanCoef, 0, ACE_player getVariable [QGVAR(dropDistance), DROP_DISTANCE_DEFAULT]]));

View File

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

View File

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

View File

@ -31,7 +31,7 @@ _actions = [];
if (getText (_item >> "ACE_Attachable") != "") then {
_displayName = getText(_item >> "displayName");
_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];
};
};
@ -44,7 +44,7 @@ _actions = [];
if (getText (_item >> "ACE_Attachable") != "") then {
_displayName = getText(_item >> "displayName");
_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];
};
};

View File

@ -54,9 +54,20 @@ while {(_closeInMax - _closeInMin) > 0.01} do {
_endPosShifted = _endPosTest vectorAdd _x;
_endASL = if (surfaceIsWater _startingPosShifted) then {_endPosShifted} else {ATLtoASL _endPosShifted};
//Uncomment to see the lazor show, and see how the scanning works:
// drawLine3D [_startingPosShifted, _endPosShifted, [1,0,0,1]];
if (_attachToVehicle in lineIntersectsWith [_startASL, _endASL, _unit]) exitWith {_doesIntersect = true};
#ifdef DRAW_ATTACH_SCAN
[{
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], [0,0,0.05], [0,0,-0.05]];

View File

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

View File

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

View File

@ -12,7 +12,7 @@ class CfgVehicles {
icon = "\a3\ui_f\data\gui\cfg\Hints\chemlights_ca.paa";
condition = QUOTE(count ([ACE_player] call FUNC(getShieldComponents)) > 0);
statement = "true";
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
exceptions[] = {"isNotDragging", "isNotSwimming", "notOnMap", "isNotInside", "isNotSitting"};
insertChildren = QUOTE(_this call DFUNC(compileChemlightMenu));
showDisabled = 0;
priority = 99;
@ -20,10 +20,10 @@ class CfgVehicles {
};
};
};
class Thing;
class ThingX;
class ACE_Chemlight_IR_Marker: Thing {
author = ECSTRING(common,ACETeam);
displayName = "ACE Chemlight IR Marker";
@ -49,7 +49,7 @@ class CfgVehicles {
useFlare = 0;
};
};
class ACE_Chemlight_IR_Dummy: ThingX {
ACE_Attachable = "ACE_G_Chemlight_IR";
author = ECSTRING(common,ACETeam);
@ -62,7 +62,7 @@ class CfgVehicles {
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
};
};
class Item_Base_F;
class ACE_Item_Chemlight_Shield: Item_Base_F {
@ -78,7 +78,7 @@ class CfgVehicles {
};
};
};
class ACE_Item_Chemlight_Shield_Green: Item_Base_F {
scope = 2;
scopeCurator = 2;
@ -92,7 +92,7 @@ class CfgVehicles {
};
};
};
class ACE_Item_Chemlight_Shield_Red: ACE_Item_Chemlight_Shield_Green {
displayName = CSTRING(Shield_Red_DisplayName);
class TransportItems {
@ -102,7 +102,7 @@ class CfgVehicles {
};
};
};
class ACE_Item_Chemlight_Shield_Blue: ACE_Item_Chemlight_Shield_Green {
displayName = CSTRING(Shield_Blue_DisplayName);
class TransportItems {
@ -112,7 +112,7 @@ class CfgVehicles {
};
};
};
class ACE_Item_Chemlight_Shield_Yellow: ACE_Item_Chemlight_Shield_Green {
displayName = CSTRING(Shield_Yellow_DisplayName);
class TransportItems {
@ -122,7 +122,7 @@ class CfgVehicles {
};
};
};
class ACE_Item_Chemlight_Shield_Orange: ACE_Item_Chemlight_Shield_Green {
displayName = CSTRING(Shield_Orange_DisplayName);
class TransportItems {
@ -132,7 +132,7 @@ class CfgVehicles {
};
};
};
class ACE_Item_Chemlight_Shield_White: ACE_Item_Chemlight_Shield_Green {
displayName = CSTRING(Shield_White_DisplayName);
class TransportItems {
@ -154,13 +154,13 @@ class CfgVehicles {
MACRO_ADDITEM(ACE_Chemlight_Shield,12);
};
};
class Box_NATO_Support_F: NATO_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_Chemlight_Shield,12);
};
};
class B_supplyCrate_F: ReammoBox_F {
class TransportItems {
MACRO_ADDITEM(ACE_Chemlight_Shield,12);
@ -172,13 +172,13 @@ class CfgVehicles {
MACRO_ADDITEM(ACE_Chemlight_Shield,12);
};
};
class Box_East_Support_F: EAST_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_Chemlight_Shield,12);
};
};
class O_supplyCrate_F: B_supplyCrate_F {
class TransportItems {
MACRO_ADDITEM(ACE_Chemlight_Shield,12);
@ -190,13 +190,13 @@ class CfgVehicles {
MACRO_ADDITEM(ACE_Chemlight_Shield,12);
};
};
class Box_IND_Support_F: IND_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_Chemlight_Shield,12);
};
};
class I_supplyCrate_F: B_supplyCrate_F {
class TransportItems {
MACRO_ADDITEM(ACE_Chemlight_Shield,12);
@ -208,19 +208,19 @@ class CfgVehicles {
MACRO_ADDITEM(ACE_Chemlight_Shield,12);
};
};
class IG_supplyCrate_F: ReammoBox_F {
class TransportItems {
MACRO_ADDITEM(ACE_Chemlight_Shield,12);
};
};
class C_supplyCrate_F: ReammoBox_F {
class TransportItems {
MACRO_ADDITEM(ACE_Chemlight_Shield,12);
};
};
class ACE_Box_Misc: Box_NATO_Support_F {
class TransportItems {
MACRO_ADDITEM(ACE_Chemlight_Shield,12);
@ -235,7 +235,7 @@ class CfgVehicles {
MACRO_ADDMAGAZINE(ACE_Chemlight_IR,20);
};
};
class ACE_Box_Chemlights: NATO_Box_Base {
scope = 2;
accuracy = 1;
@ -246,11 +246,11 @@ class CfgVehicles {
transportMaxItems = 9002;
maximumload = 9002;
model = "\A3\weapons_F\AmmoBoxes\WpnsBox_large_F";
class TransportItems {
MACRO_ADDITEM(ACE_Chemlight_Shield,20);
};
class TransportMagazines {
MACRO_ADDMAGAZINE(Chemlight_red,20);
MACRO_ADDMAGAZINE(Chemlight_blue,20);
@ -264,7 +264,7 @@ class CfgVehicles {
MACRO_ADDMAGAZINE(ACE_Chemlight_HiWhite,10);
MACRO_ADDMAGAZINE(ACE_Chemlight_IR,20);
};
class AnimationSources {
class Ammo_source {
source = "user";

View File

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

View File

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

View File

@ -18,7 +18,7 @@
if (!alive ACE_player) exitWith {false};
// 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:
if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) exitWith {false};
//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;
[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

View File

@ -17,7 +17,7 @@
if (!alive ACE_player) then {GVAR(fingersHash) = [] call CBA_fnc_hashCreate;};
// 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:
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 Man;
class CAManBase: Man {
class ACE_SelfActions {
@ -7,6 +6,7 @@ class CfgVehicles {
displayName = CSTRING(Gestures);
condition = QUOTE((canStand _target) && {GVAR(showOnInteractionMenu) == 2});
statement = "";
exceptions[] = {"isNotSwimming"};
showDisabled = 1;
priority = 3.5;
icon = QPATHTOF(UI\gestures_ca.paa);
@ -14,42 +14,48 @@ class CfgVehicles {
class GVAR(Advance) {
displayName = CSTRING(Advance);
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;
priority = 1.9;
};
class GVAR(Go) {
displayName = CSTRING(Go);
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;
priority = 1.8;
};
class GVAR(Follow) {
displayName = CSTRING(Follow);
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;
priority = 1.7;
};
class GVAR(Up) {
displayName = CSTRING(Up);
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;
priority = 1.5;
};
class GVAR(CeaseFire) {
displayName = CSTRING(CeaseFire);
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;
priority = 1.3;
};
class GVAR(Stop) {
displayName = CSTRING(Stop);
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;
priority = 1.2;
};
@ -57,6 +63,7 @@ class CfgVehicles {
displayName = CSTRING(Forward);
condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(forward)) call FUNC(playSignal));
exceptions[] = {"isNotSwimming"};
showDisabled = 1;
priority = 1.9;
};
@ -64,6 +71,7 @@ class CfgVehicles {
displayName = CSTRING(Regroup);
condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(regroup)) call FUNC(playSignal));
exceptions[] = {"isNotSwimming"};
showDisabled = 1;
priority = 1.8;
};
@ -71,6 +79,7 @@ class CfgVehicles {
displayName = CSTRING(Freeze);
condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(freeze)) call FUNC(playSignal));
exceptions[] = {"isNotSwimming"};
showDisabled = 1;
priority = 1.7;
};
@ -78,6 +87,7 @@ class CfgVehicles {
displayName = CSTRING(Cover);
condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(cover)) call FUNC(playSignal));
exceptions[] = {"isNotSwimming"};
showDisabled = 1;
priority = 1.6;
};
@ -85,6 +95,7 @@ class CfgVehicles {
displayName = CSTRING(Point);
condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(point)) call FUNC(playSignal));
exceptions[] = {"isNotSwimming"};
showDisabled = 1;
priority = 1.5;
};
@ -92,6 +103,7 @@ class CfgVehicles {
displayName = CSTRING(Engage);
condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(engage)) call FUNC(playSignal));
exceptions[] = {"isNotSwimming"};
showDisabled = 1;
priority = 1.4;
};
@ -99,6 +111,7 @@ class CfgVehicles {
displayName = CSTRING(Hold);
condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(hold)) call FUNC(playSignal));
exceptions[] = {"isNotSwimming"};
showDisabled = 1;
priority = 1.3;
};
@ -106,6 +119,7 @@ class CfgVehicles {
displayName = CSTRING(Warning);
condition = QUOTE(true);
statement = QUOTE(QUOTE(QGVAR(warning)) call FUNC(playSignal));
exceptions[] = {"isNotSwimming"};
showDisabled = 1;
priority = 1.2;
};

View File

@ -18,7 +18,7 @@
TRACE_1("params",_this);
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 {
//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 {
displayName = CSTRING(EarPlugs_On);
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) );
showDisabled = 0;
priority = 2.5;
@ -15,7 +15,7 @@ class CfgVehicles {
class ACE_RemoveEarplugs {
displayName = CSTRING(EarPlugs_Off);
condition = QUOTE( GVAR(EnableCombatDeafness) && {[_player] call FUNC(hasEarPlugsIn)});
exceptions[] = {"isNotInside", "isNotSitting"};
exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"};
statement = QUOTE( [_player] call FUNC(removeEarPlugs) );
showDisabled = 0;
priority = 2.5;

View File

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

View File

@ -19,7 +19,8 @@
private _bb = boundingBoxReal _target;
(_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
_relPos = _target worldToModelVisual ASLToAGL eyePos ACE_player;
#endif
@ -47,9 +48,14 @@ if (_ndx > _ndy) then {
_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];
TRACE_4("",_bb,_bbX,_relPos, _pos);
// Set max height at player's eye level (prevent very high interaction point on choppers)
// 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
///////////////////

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)
_pos set [2, (_pos select 2) min _dz];
// Set max height at player's eye level (prevent very high interaction point on vehicles)
// 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

View File

@ -23,33 +23,39 @@ private ["_timeToCut", "_progressCheck", "_onCompletion", "_onFail"];
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 = {
TRACE_1("_onCompletion",_this);
(_this select 0) params ["_fenceObject", "", "_unit"];
_fenceObject setdamage 1;
[_unit, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
if (!underwater _unit) then {
[_unit, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
};
};
_onFail = {
TRACE_1("_onFail", _this);
(_this select 0) params ["", "", "_unit"];
[_unit, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
if (!underwater _unit) then {
[_unit, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
};
};
_progressCheck = {
params ["_args", "_passedTime"];
_args params ["_fenceObject", "_lastSoundEffectTime"];
_args params ["_fenceObject", "_lastSoundEffectTime", "_unit"];
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];
};
((!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 = {
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))} && {
//Custom LOS check for fence
private _headPos = ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot");

View File

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

View File

@ -25,7 +25,7 @@ _args params ["_magazineClassname", "_lastAmmoCount"];
private _fullMagazineCount = getNumber (configFile >> "CfgMagazines" >> _magazineClassname >> "count");
// 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
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};
//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);
@ -67,5 +67,5 @@ private _totalTime = _simEvents select (count _simEvents - 1) select 0;
{_this call FUNC(magazineRepackFinish)},
(localize LSTRING(RepackingMagazine)),
{_this call FUNC(magazineRepackProgress)},
["isNotInside", "isNotSitting"]
["isNotInside", "isNotSwimming", "isNotSitting"]
] call EFUNC(common,progressBar);

View File

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

View File

@ -522,7 +522,7 @@ class CfgVehicles {
class ACE_Actions {
// 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);
#include "ACE_Medical_Actions.hpp"
@ -538,7 +538,7 @@ class CfgVehicles {
#undef EXCEPTIONS
#undef ACTION_CONDITION
#define EXCEPTIONS exceptions[] = {"isNotInside"};
#define EXCEPTIONS exceptions[] = {"isNotInside", "isNotSwimming"};
#define ACTION_CONDITION condition = "true";
#include "ACE_Medical_Actions.hpp"
};
@ -550,7 +550,7 @@ class CfgVehicles {
showDisabled = 0;
priority = 2;
icon = QPATHTOF(UI\icons\medical_cross.paa);
exceptions[] = {"isNotDragging", "isNotCarrying"};
exceptions[] = {"isNotDragging", "isNotCarrying", "isNotSwimming"};
};
class GVAR(UnLoadPatient) {
displayName = CSTRING(UnloadPatient);
@ -560,7 +560,7 @@ class CfgVehicles {
showDisabled = 0;
priority = 2;
icon = QPATHTOF(UI\icons\medical_cross.paa);
exceptions[] = {"isNotDragging", "isNotCarrying", "isNotInside"};
exceptions[] = {"isNotDragging", "isNotCarrying", "isNotInside", "isNotSwimming"};
};
};
};

View File

@ -176,21 +176,24 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then {
_caller selectWeapon (primaryWeapon _caller); // unit always has a primary weapon here
};
if (isWeaponDeployed _caller) then {
TRACE_1("Weapon Deployed, breaking out first",(stance _caller));
[_caller, "", 0] call EFUNC(common,doAnimation);
};
if ((stance _caller) == "STAND") then {
switch (_wpn) do {//If standing, end in a crouched animation based on their current weapon
case ("rfl"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWrflDnon"];};
case ("pst"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWpstDnon"];};
case ("non"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSnonWnonDnon"];};
if (!underwater _caller) then {
// Weapon on back also does not work underwater
if (isWeaponDeployed _caller) then {
TRACE_1("Weapon Deployed, breaking out first",(stance _caller));
[_caller, "", 0] call EFUNC(common,doAnimation);
};
} else {
_caller setVariable [QGVAR(treatmentPrevAnimCaller), animationState _caller];
if ((stance _caller) == "STAND") then {
switch (_wpn) do {//If standing, end in a crouched animation based on their current weapon
case ("rfl"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWrflDnon"];};
case ("pst"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWpstDnon"];};
case ("non"): {_caller setVariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSnonWnonDnon"];};
};
} else {
_caller setVariable [QGVAR(treatmentPrevAnimCaller), animationState _caller];
};
[_caller, _callerAnim] call EFUNC(common,doAnimation);
};
[_caller, _callerAnim] call EFUNC(common,doAnimation);
};
//Get treatment time
@ -220,7 +223,7 @@ private _treatmentTime = if (isNumber (_config >> "treatmentTime")) then {
DFUNC(treatment_failure),
getText (_config >> "displayNameProgress"),
_callbackProgress,
["isnotinside"]
["isNotInside", "isNotSwimming"]
] call EFUNC(common,progressBar);
// Display Icon

View File

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

View File

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

View File

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

View File

@ -19,7 +19,7 @@
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 {
GVAR(actionsAdvanced);

View File

@ -34,7 +34,7 @@ if (_name isEqualTo "toggle") exitWith {
_newTarget = ACE_player;
//If we are on the player, and only if our old target is still valid, switch to it:
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 {
_newTarget = GVAR(INTERACTION_TARGET_PREVIOUS);
};

View File

@ -75,7 +75,7 @@ GVAR(MenuPFHID) = [{
[GVAR(LatestDisplayOptionMenu)] call FUNC(handleUI_DisplayOptions);
//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;
//If we failed because of distance check, show UI message:
if ((ACE_player distance GVAR(INTERACTION_TARGET)) > GVAR(maxRange)) then {

View File

@ -7,7 +7,7 @@ class CfgVehicles {
class GVAR(UnJam) {
displayName = CSTRING(UnjamWeapon);
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); );
showDisabled = 0;
priority = 4;
@ -16,6 +16,7 @@ class CfgVehicles {
class GVAR(SwapBarrel) {
displayName = CSTRING(SwapBarrel);
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); );
showDisabled = 0;
priority = 3;
@ -24,7 +25,7 @@ class CfgVehicles {
class GVAR(CheckTemperature) {
displayName = CSTRING(CheckTemperatureShort);
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); );
showDisabled = 0;
priority = 2.9;
@ -33,7 +34,7 @@ class CfgVehicles {
class GVAR(CheckTemperatureSpareBarrels) {
displayName = CSTRING(CheckTemperatureSpareBarrelsShort);
condition = QUOTE((_player) call FUNC(canCheckSpareBarrelsTemperatures) );
exceptions[] = {"isNotInside", "isNotSitting"};
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
statement = QUOTE( [_player] call FUNC(checkSpareBarrelsTemperatures); );
showDisabled = 0;
priority = 2.8;
@ -48,12 +49,13 @@ class CfgVehicles {
displayName = CSTRING(SwapBarrel);
condition = QUOTE( [ARR_2(_player, currentWeapon _target)] call FUNC(canSwapBarrel) );
statement = QUOTE([ARR_3(_player, _target, currentWeapon _target)] call FUNC(swapBarrelAssistant););
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
icon = QUOTE(PATHTOF(UI\spare_barrel_ca.paa));
};
class GVAR(CheckTemperature) {
displayName = CSTRING(CheckTemperatureShort);
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); );
icon = QUOTE(PATHTOF(UI\temp_ca.paa));
};

View File

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

View File

@ -34,4 +34,4 @@ if (_assistant isEqualTo _gunner) then {
_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
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;

View File

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

View File

@ -6,7 +6,7 @@ if (!hasInterface) exitWith {};
// Add keybinds
["ACE3 Weapons", QGVAR(checkAmmo), localize LSTRING(checkAmmo), {
// 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
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);
// 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";
distance = 4;
condition = "";
exceptions[] = {"isNotInside", "isNotSwimming"};
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 (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
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}
};
[_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; \
icon = "\A3\ui_f\data\igui\cfg\actions\repair_ca.paa"; \
distance = 4; \
exceptions[] = {"isNotOnLadder"}; \
exceptions[] = {"isNotSwimming", "isNotOnLadder"}; \
}; \
}; \
};

View File

@ -23,7 +23,7 @@ params ["_caller", "_target", "_hitPointIndex"];
(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
_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
};
if (stance _caller == "STAND") then {
_caller setVariable [QGVAR(repairPrevAnimCaller), "amovpknlmstpsraswrfldnon"];
} else {
_caller setVariable [QGVAR(repairPrevAnimCaller), animationState _caller];
if (!underwater _caller) then {
if (stance _caller == "STAND") then {
_caller setVariable [QGVAR(repairPrevAnimCaller), "amovpknlmstpsraswrfldnon"];
} else {
_caller setVariable [QGVAR(repairPrevAnimCaller), animationState _caller];
};
[_caller, _callerAnim] call EFUNC(common,doAnimation);
};
[_caller, _callerAnim] call EFUNC(common,doAnimation);
};
// Get repair time
@ -224,7 +226,7 @@ TRACE_4("display",_hitPoint,_hitPointClassname,_processText,_text);
DFUNC(repair_failure),
_text,
_callbackProgress,
["isNotOnLadder"]
["isNotSwimming", "isNotOnLadder"]
] call EFUNC(common,progressBar);
// Display Icon

View File

@ -31,7 +31,7 @@ private ["_config","_callback", "_usersOfItems", "_weaponSelect"];
if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
_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 setVariable [QGVAR(repairPrevAnimCaller), nil];

View File

@ -31,7 +31,7 @@ private ["_config","_callback", "_weaponSelect"];
if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
_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 setVariable [QGVAR(repairPrevAnimCaller), nil];

View File

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

View File

@ -11,7 +11,7 @@ if (!hasInterface) exitWith {};
["ACE3 Weapons", QGVAR(safeMode), localize LSTRING(SafeMode),
{
// 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
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;
priority = 0.2;
//icon = QPATHTOF(UI\...); // TODO
exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"};
exceptions[] = {"notOnMap", "isNotInside", "isNotSwimming", "isNotSitting"};
};
};
};

View File

@ -19,7 +19,7 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]];
["ace_settingsInitialized", {
if (!GVAR(enabled)) exitWith {};
if (GVAR(deduceBarometricPressureFromTerrainAltitude)) then {
GVAR(zeroReferenceBarometricPressure) = 1013.25 * (1 - (0.0065 * EGVAR(common,mapAltitude)) / 288.15) ^ 5.255754495;
};
@ -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
["ACE3 Scope Adjustment", QGVAR(AdjustUpMinor), localize LSTRING(AdjustUpMinor), {
// 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
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), {
// 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
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), {
// 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
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), {
// 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
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), {
// 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
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), {
// 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
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), {
// 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
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), {
// 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
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
@ -143,5 +143,5 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]];
// Register fire event handler
["ace_firedPlayer", DFUNC(firedEH)] call CBA_fnc_addEventHandler;
["ace_firedPlayerNonLocal", DFUNC(firedEH)] call CBA_fnc_addEventHandler;
}] call CBA_fnc_addEventHandler;

View File

@ -28,6 +28,7 @@
distance = 4; \
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); \
exceptions[] = {"isNotSwimming"}; \
priority = 0.3; \
icon = QPATHTOF(UI\key_menuIcon_ca.paa); \
}; \
@ -36,6 +37,7 @@
distance = 4; \
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); \
exceptions[] = {"isNotSwimming"}; \
priority = 0.2; \
icon = QPATHTOF(UI\key_menuIcon_ca.paa); \
}; \
@ -44,6 +46,7 @@
distance = 4; \
condition = QUOTE([ARR_3(_player, _target, 'canLockpick')] call FUNC(lockpick)); \
statement = QUOTE([ARR_3(_player, _target, 'startLockpick')] call FUNC(lockpick)); \
exceptions[] = {"isNotSwimming"}; \
priority = 0.1; \
}; \
}; \
@ -61,6 +64,13 @@ class CfgVehicles {
class Helicopter: Air {
MACRO_LOCK_ACTIONS
};
class Motorcycle: LandVehicle {
MACRO_LOCK_ACTIONS
};
class Ship;
class Ship_F: Ship {
MACRO_LOCK_ACTIONS
};
class 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]};
};
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": {
[QGVAR(setVehicleLock), [_veh, false], [_veh]] call CBA_fnc_targetEvent;

View File

@ -15,7 +15,7 @@ GVAR(isSpeedLimiter) = false;
true
} else {
// 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
if !(ACE_player == driver vehicle ACE_player &&
{vehicle ACE_player isKindOf 'Car' ||