Skip to content

Commit 3c782ad

Browse files
committed
v1.1.6
1 parent 6789ecc commit 3c782ad

File tree

11 files changed

+55
-53
lines changed

11 files changed

+55
-53
lines changed

@AIO_SPPack/addons/AIO_AIMENU.pbo

-118 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

@AIO_SPPack/addons/AIO_AIMENU/functions/menu/fn_createMountMenu.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ call
255255
call compile _text;
256256
};
257257
AIO_VehList_subMenu append [["", [], "", -1, [["expression", ""]], "1", "0"],
258-
[parseText"<img image='\A3\ui_f\data\IGUI\Cfg\simpleTasks\types\target_ca.paa'/><t font='PuristaBold'> %POINTED_TARGET_NAME", [], "", -5, [["expression", "[AIO_selectedunits, cursorTarget] call AIO_fnc_disassembleUAV"]], "IsLeader * ((NotEmptySoldiers) * (CursorOnVehicleCanGetIn) * (CursorOnEmptyVehicle))", "CursorOnGround",
258+
[parseText"<img image='\A3\ui_f\data\IGUI\Cfg\simpleTasks\types\target_ca.paa'/><t font='PuristaBold'> %POINTED_TARGET_NAME", [], "", -5, [["expression", "[AIO_selectedunits, cursorTarget] call AIO_fnc_disassembleUAV"]], "IsLeader * NotEmptySoldiers", "CursorOnGround",
259259
"\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa"]];
260260

261261
};

@AIO_SPPack/addons/AIO_AIMENU/functions/unitCommands/medical/fn_addAction.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ _id = [
77
"Revive", //title
88
"\A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_revive_ca.paa", //idleIcon
99
"\A3\Ui_f\data\IGUI\Cfg\HoldActions\holdAction_revive_ca.paa", //progressIcon
10-
"(_this distance _target < 3) && {alive _target}", //condition show
11-
"!(_target in (attachedObjects _this)) && {(_this distance _target < 4) && (currentWeapon _this != secondaryWeapon _this) && (alive _this) && (alive _target)}", //condition progress
10+
"(_this distance _target < 3) && {alive _target && !(_target in (attachedObjects _this))}", //condition show
11+
"(_this distance _target < 4) && (currentWeapon _this != secondaryWeapon _this) && (alive _this) && (alive _target)", //condition progress
1212
{
1313
//codeStart
1414
params ["_target", "_caller", "_actionId", "_argsuments"];

@AIO_SPPack/addons/AIO_AIMENU/functions/unitCommands/medical/fn_dragAction.sqf

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,43 @@ if (_type == 0) then {
77
params ["_target", "_caller", "_actionId", "_arguments"];
88
_anim = (animationState _target) select [0,11];
99
if (_anim != "unconscious") exitWith {[0,"Patient isn't Ready!"] call AIO_fnc_customHint};
10-
_target setAnimSpeedCoef 2.4;
11-
_caller setAnimSpeedCoef 2;
10+
_target setAnimSpeedCoef 2.02;
11+
_caller setAnimSpeedCoef 1.75;
1212
_target switchMove "AinjPfalMstpSnonWrflDnon_carried_Up";
1313
_target playMoveNow "AinjPfalMstpSnonWrflDnon_carried_Up";
1414
_caller switchMove "AcinPknlMstpSrasWrflDnon_AcinPercMrunSrasWrflDnon";
1515
_caller playMoveNow "AcinPknlMstpSrasWrflDnon_AcinPercMrunSrasWrflDnon";
16-
_target disableAI "ANIM";
1716
_cond1 = {
1817
params ["_caller", "_initTime"];
1918
if (_x distance2D _caller > 5) exitWith {true};
2019
_animS = animationState _caller;
21-
if (_animS == "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon" && time - _initTime < 8) exitWith {false};
22-
_x setAnimSpeedCoef 1;
20+
if (animationState _x == "ainjpfalmstpsnonwrfldnon_carried_still" && {abs((getDir _x) - (getDir _caller)) > 5}) then {
21+
_x setDir 0; _x attachTo [_caller, [0.2,0.1,0.1]]
22+
};
23+
if (count _animS > 26 && time - _initTime < 8) exitWith {false};
24+
hintSilent str count _animS;
2325
_caller setAnimSpeedCoef 1;
24-
_fail = ((lifeState _caller == "INCAPACITATED") || (lifeState _x != "INCAPACITATED") || {_animS select [0,5] != "AcinP"});
26+
_x setAnimSpeedCoef 1;
27+
_fail = ((lifeState _caller == "INCAPACITATED") || (lifeState _x != "INCAPACITATED") || {_animS select [0,4] != "Acin"});
2528
_fail
2629
};
2730
_code1 = {
2831
params ["_caller"];
2932
//_caller playMoveNow "AcinPercMrunSrasWrflDf_AmovPercMstpSlowWrflDnon";
3033
//_x switchMove "AinjPfalMstpSnonWrflDnon_carried_Down";
34+
_x enableAI "ANIM";
3135
detach _x;
3236
_x playMoveNow "unconsciousReviveDefault";
3337
_x setAnimSpeedCoef 1;
3438
_caller setAnimSpeedCoef 1;
3539
_x setVariable ["AIO_medic", objNull];
3640
if (lifeState _caller != "INCAPACITATED") then {_caller switchMove ""};
37-
_x enableAI "PATH";
38-
_x enableAI "ANIM";
3941
_caller removeAction (_caller getVariable ["AIO_actionDrop", -1]);
40-
_x setPos ([_caller, 0.5] call AIO_fnc_exactPos);
4142
_caller setVariable ["AIO_actionDrop", -1];
4243
[_x, 0] call AIO_fnc_dragAction;
4344
};
45+
_target disableAI "MOVE";
46+
_target disableAI "ANIM";
4447
_cond2 = {false};
4548
_code2 = {};
4649
_target setVariable ["AIO_animation", [[], [], [_cond1, _code1, _cond2, _code2, [_caller, time]], ["AinjPfalMstpSnonWrflDnon_carried_Up",1], time+1000]];
@@ -76,21 +79,19 @@ if (_type == 0) then {
7679
params ["_caller"];
7780
if (_x distance2D _caller > 5) exitWith {true};
7881
_animS = animationState _caller;
79-
if (_animS == "amovpercmstpslowwrfldnon_acinpknlmwlkslowwrfldb_2") exitWith {false};
80-
_fail = ((lifeState _caller == "INCAPACITATED") || (lifeState _x != "INCAPACITATED") || {_animS select [0,5] != "AcinP"});
82+
if (count _animS > 26) exitWith {false};
83+
_fail = ((lifeState _caller == "INCAPACITATED") || (lifeState _x != "INCAPACITATED") || {_animS select [0,4] != "Acin"});
8184
_fail
8285
};
8386
_code1 = {
8487
params ["_caller"];
8588
//_caller playMoveNow "AcinPknlMstpSrasWrflDnon_AmovPknlMstpSrasWrflDnon";
89+
_x enableAI "ANIM";
8690
detach _x;
8791
_x switchMove "AinjPpneMstpSnonWrflDb_release";
8892
_x playMoveNow "unconsciousReviveDefault";
8993
_x setVariable ["AIO_medic", objNull];
90-
_x enableAI "PATH";
91-
_x enableAI "ANIM";
9294
_caller playMoveNow "AcinPknlMstpSrasWrflDnon_AmovPknlMstpSrasWrflDnon";
93-
_x setPos ([_caller, 0.5] call AIO_fnc_exactPos);
9495
_caller removeAction (_caller getVariable ["AIO_actionDrop", -1]);
9596
_caller setVariable ["AIO_actionDrop", -1];
9697
[_x, 0] call AIO_fnc_dragAction;
@@ -106,7 +107,8 @@ if (_type == 0) then {
106107
AIO_animatedUnits pushBackUnique _target;
107108

108109
_target setVariable ["AIO_medic", _caller];
109-
110+
_target disableAI "MOVE";
111+
_target disableAI "ANIM";
110112
_target attachTo [_caller, [0,0.8,0]];
111113
_target setDir 180;
112114
_target removeAction _actionId;
@@ -133,26 +135,24 @@ if (_type == 0) then {
133135
_arguments params ["_type", "_target"];
134136
_animS = animationState _caller;
135137
if (_type == 1) then {
136-
if (_animS select [0,5] != "AcinP") exitWith {[0,"Try again in a moment."] call AIO_fnc_customHint};
138+
if (count _animS > 26) exitWith {[0,"Try again in a moment."] call AIO_fnc_customHint};
137139
AIO_animatedUnits = AIO_animatedUnits - [_target];
140+
_target enableAI "ANIM";
138141
detach _target;
139142
_target playMoveNow "unconsciousReviveDefault";
140143
_caller playMoveNow "AcinPercMrunSrasWrflDf_AmovPercMstpSlowWrflDnon";
141144
_target setVariable ["AIO_medic", objNull];
142-
_target enableAI "PATH";
143-
_target enableAI "ANIM";
144145
//_target setPos ([_caller, 0.5] call AIO_fnc_exactPos);
145146
_unit removeAction _actionId;
146147
[_target, 0] call AIO_fnc_dragAction;
147148
} else {
148-
if (_animS select [0,5] != "AcinP") exitWith {[0,"Try again in a moment."] call AIO_fnc_customHint};
149+
if (count _animS > 26) exitWith {[0,"Try again in a moment."] call AIO_fnc_customHint};
149150
AIO_animatedUnits = AIO_animatedUnits - [_target];
151+
_target enableAI "ANIM";
150152
detach _target;
151153
_caller playMoveNow "AcinPknlMstpSrasWrflDnon_AmovPknlMstpSrasWrflDnon";
152154
_target playMoveNow "unconsciousReviveDefault";
153155
_target setVariable ["AIO_medic", objNull];
154-
_target enableAI "PATH";
155-
_target enableAI "ANIM";
156156
//_target setPos ([_caller, 0.5] call AIO_fnc_exactPos);
157157
_unit removeAction _actionId;
158158
[_target, 0] call AIO_fnc_dragAction;

@AIO_SPPack/addons/AIO_AIMENU/functions/unitCommands/medical/fn_dragWounded.sqf

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,16 @@ if (_mode == 2) then {
1111
params ["_target"];
1212
if (_target distance2D _x > 5) exitWith {true};
1313
_animS = animationState _x;
14-
_target disableAI "MOVE";
15-
_target disableAI "ANIM";
1614
_target playMoveNow "AinjPpneMstpSnonWrflDb";
17-
if (_animS == "amovpercmstpslowwrfldnon_acinpknlmwlkslowwrfldb_2") exitWith {false};
18-
_fail = ((lifeState _x == "INCAPACITATED") || (lifeState _target != "INCAPACITATED") || {_animS select [0,5] != "AcinP"});
15+
if (count _animS > 26) exitWith {false};
16+
_fail = ((lifeState _x == "INCAPACITATED") || (lifeState _target != "INCAPACITATED") || {_animS select [0,4] != "Acin"});
1917
_fail
2018
};
2119
_code1 = {
2220
params ["_target"];
2321
detach _target;
24-
_target disableAI "PATH";
25-
_target disableAI "ANIM";
22+
_target disableAI "MOVE";
23+
_target enableAI "ANIM";
2624
_target switchMove "AinjPpneMstpSnonWrflDb_Death";
2725
_target playMoveNow "unconsciousReviveDefault";
2826
if (lifeState _x != "INCAPACITATED") then {_x playMoveNow "AcinPknlMstpSrasWrflDnon_AmovPknlMstpSrasWrflDnon"} else {_x playMoveNow "unconsciousReviveDefault"};
@@ -31,14 +29,18 @@ if (_mode == 2) then {
3129
params ["_target", "_lastPos"];
3230
_x setVariable ["AIO_inCover", true];
3331
detach _target;
34-
_target disableAI "PATH";
35-
_target disableAI "ANIM";
32+
_target disableAI "MOVE";
33+
_target enableAI "ANIM";
3634
_target switchMove "AinjPpneMstpSnonWrflDb_Death";
3735
_target playMoveNow "unconsciousReviveDefault";
3836
if (lifeState _x != "INCAPACITATED") then {_x playMoveNow "AcinPknlMstpSrasWrflDnon_AmovPknlMstpSrasWrflDnon"} else {_x playMoveNow "unconsciousReviveDefault"};
3937
_x setPosASL _lastPos;
4038
_target setPosASL _lastPos;
4139
};
40+
41+
_target disableAI "MOVE";
42+
_target disableAI "ANIM";
43+
4244
_unit setVariable ["AIO_animation", [_positions, [], [_cond1, _code1, {true}, _code2, [_target, _lastPos]], ["AcinPknlMwlkSrasWrflDb", -1],100*_mode+time]];
4345
if (!(_target in AIO_animatedUnits) || {(animationState _target) select [0,4] != "Ainj"}) then {
4446
_target switchMove "AinjPpneMstpSnonWrflDb";
@@ -51,31 +53,26 @@ if (_mode == 2) then {
5153
_target setDir 180;
5254
AIO_animatedUnits pushBackUnique _unit;
5355
} else {
54-
_target setAnimSpeedCoef 2.3;
55-
_unit setAnimSpeedCoef 2;
56+
_target setAnimSpeedCoef 2.02;
57+
_unit setAnimSpeedCoef 1.75;
5658
_cond1 = {
5759
params ["_target"];
5860
if (_target distance2D _x > 5) exitWith {true};
5961
_animS = animationState _x;
60-
_target disableAI "PATH";
61-
_target disableAI "ANIM";
62-
_isStill = animationState _target == "ainjpfalmstpsnonwrfldnon_carried_still";
63-
if !(_isStill) then {_target playMoveNow "AinjPfalMstpSnonWrflDnon_carried_Up"} else {
64-
if (abs((getDir _target) - (getDir _x)) > 5) then {
65-
_target setDir 0; _target attachTo [_x, [0.2,0.1,0.1]]
66-
};
62+
if (animationState _target == "ainjpfalmstpsnonwrfldnon_carried_still" && {abs((getDir _target) - (getDir _x)) > 5}) then {
63+
_target setDir 0; _target attachTo [_x, [0.2,0.1,0.1]]
6764
};
68-
if (_animS == "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon") exitWith {false};
65+
if (count _animS > 26) exitWith {false};
6966
_x setAnimSpeedCoef 1;
7067
_target setAnimSpeedCoef 1;
71-
_fail = ((lifeState _x == "INCAPACITATED") || (lifeState _target != "INCAPACITATED") || {_animS select [0,5] != "AcinP"});
68+
_fail = ((lifeState _x == "INCAPACITATED") || (lifeState _target != "INCAPACITATED") || {_animS select [0,4] != "Acin"});
7269
_fail
7370
};
7471
_code1 = {
7572
params ["_target"];
7673
detach _target;
77-
_target disableAI "PATH";
78-
_target disableAI "ANIM";
74+
_target disableAI "MOVE";
75+
_target enableAI "ANIM";
7976
_target playMoveNow "unconsciousReviveDefault";
8077
_target setAnimSpeedCoef 1;
8178
_x setAnimSpeedCoef 1;
@@ -85,15 +82,18 @@ if (_mode == 2) then {
8582
params ["_target", "_lastPos"];
8683
_x setVariable ["AIO_inCover", true];
8784
detach _target;
88-
_target disableAI "PATH";
89-
_target disableAI "ANIM";
85+
_target disableAI "MOVE";
86+
_target enableAI "ANIM";
9087
_target setAnimSpeedCoef 1;
9188
_x setAnimSpeedCoef 1;
9289
_target playMoveNow "unconsciousReviveDefault";
9390
if (lifeState _x != "INCAPACITATED") then {_x playMoveNow "AcinPercMrunSrasWrflDf_AmovPercMstpSlowWrflDnon"} else {_x playMoveNow "unconsciousReviveDefault"};
9491
_x setPosASL _lastPos;
9592
_target setPosASL _lastPos;
9693
};
94+
95+
_target disableAI "MOVE";
96+
_target disableAI "ANIM";
9797
_unit setVariable ["AIO_animation", [_positions, [], [_cond1, _code1, {true}, _code2, [_target, _lastPos]], ["acinpercmrunsraswrfldf", 1],100*_mode+time]];
9898

9999
if (!(_target in AIO_animatedUnits) || {(animationState _target) select [0,4] != "Ainj"}) then {

@AIO_SPPack/addons/AIO_AIMENU/functions/unitCommands/medical/fn_findRoute.sqf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ if (_useAgent) then {
1111
_path = _this#1;
1212
if (count _path > 1 && {(_path select 0) distance2D _unit < 1}) then {_path deleteAt 0};
1313
_path pushBack AGLToASL ((expectedDestination _agent) select 0);
14+
t_points = _path apply {[_x#0, _x#1, 0]};
1415
[_unit, (_agent getVariable ["AIO_target", objNull]), _path] call AIO_fnc_dragWounded;
1516
_agent setVariable ["AIO_deleted", true];
1617
deleteVehicle _agent;

@AIO_SPPack/addons/AIO_AIMENU/functions/unitCommands/tasking/fn_animHandler.sqf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,13 @@ waitUntil {
4343
_watchDir = (vectorNormalized _watchDir) apply {_x*_dir};
4444
if (_watchDir isEqualTo [0,0,0]) then {_watchDir = [0,1,0]};
4545
_vecDir = vectorDir _x;
46-
_angle = accTime * acos(_vecDir vectorCos _watchDir);
46+
_accTime = accTime;
47+
_angle = _accTime * acos(_vecDir vectorCos _watchDir);
4748
_turn = 1;
4849
if (_angle > 0) then {
49-
_turn = [-accTime,accTime] select (_x getRelDir _nextPos > 180);
50+
_turn = [-_accTime,_accTime] select (((_x getRelDir _nextPos) + -180*(_dir - 1)/2) mod 360 > 180);
5051

51-
if (_angle > 5 * accTime) then {
52+
if (_angle > 5 * _accTime) then {
5253
_newDir = [_vecDir, 5*_turn] call BIS_fnc_rotateVector2D;
5354
_x setVectorDir _newDir;
5455
} else {
@@ -107,5 +108,5 @@ waitUntil {
107108
};
108109
};
109110
} forEach AIO_animatedUnits;
110-
(count AIO_taskedUnits == 0)
111+
false
111112
};

@AIO_SPPack/addons/AIO_AIMENU/functions/unitCommands/tasking/fn_unitTasking.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,4 @@ waitUntil {
187187
(count AIO_taskedUnits == 0)
188188
};
189189

190-
terminate AIO_animHandler;
190+
if ({lifeState _x == "INCAPACITATED"} count AIO_animatedUnits == 0) then {terminate AIO_animHandler};

0 commit comments

Comments
 (0)