Skip to content

Commit 4317b75

Browse files
authored
Fixed more bugs in the healing function+tweaks
1 parent 15d62b5 commit 4317b75

File tree

4 files changed

+35
-33
lines changed

4 files changed

+35
-33
lines changed

addons/AIO_AIMENU/AIMenu.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ AIO_WayPoint_markers = [ [[["",[]]],[],"empty"],
99
[[["",[]]],[],"empty"],[[["",[]]],[],"empty"],[[["",[]]],[],"empty"],[[["",[]]],[],"empty"],[[["",[]]],[],"empty"]];
1010

1111
AIO_keyspressed = {
12-
if (AIO_monitoring_enabled) exitWith {AIO_monitoring_disabled = true};
12+
if (AIO_monitoring_enabled) exitWith {AIO_monitoring_disabled = true; hintSilent ""};
1313
if (hcShownBar) then {[] execVM "AIO_AIMENU\Menus_HC.sqf"} else {[] execVM "AIO_AIMENU\Menus.sqf"};
1414
if (AIO_AdvancedCtrlMode && AIO_Advanced_Ctrl) then {[] call AIO_cancel_driver_mode};
1515
};

addons/AIO_AIMENU/mount.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ _getInFnc =
5050
_unit moveTo _targetPos;
5151
};
5252
sleep 0.2;
53-
_lastPos = getPos _unit;
53+
_lastPos = getPos _target;
5454
while {currentCommand _unit == "STOP" && !(moveToCompleted _unit) && (alive _unit) && (alive _target)} do
5555
{
5656
if ((_target distance _lastPos) > 2) then {

addons/AIO_AIMENU/useFirstAid.sqf

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,25 @@ if (vehicle _target != _target && !(isPlayer _target)) then {
4747
};
4848

4949
if (vehicle _unit != _unit) then {doGetOut _unit; waitUntil {!alive _unit OR vehicle _unit == _unit}; sleep 2};
50-
51-
if !(_cover) then
52-
{
53-
_unit doWatch objNull;
54-
if (_target != player) then {
55-
if (_combat) then {
56-
_target forcespeed 1;
57-
_unit setUnitPos "MIDDLE";
50+
if !(isPlayer _target) then {
51+
if !(_cover) then
52+
{
53+
_unit doWatch objNull;
5854
if (_target != player) then {
59-
if (_currentComm == 2) then {_target doMove _pos};
60-
if (_currentComm == 1) then {doStop _target};
55+
if (_combat) then {
56+
_target forcespeed 1;
57+
_unit setUnitPos "MIDDLE";
58+
if (_target != player) then {
59+
if (_currentComm == 2) then {_target doMove _pos};
60+
if (_currentComm == 1) then {doStop _target};
61+
};
62+
} else {doStop _target};
63+
if (behaviour _target != "STEALTH") then {_target setUnitPos "MIDDLE"} else {_target setUnitPos "DOWN"};
6164
};
62-
} else {doStop _target};
63-
if (behaviour _target != "STEALTH") then {_target setUnitPos "MIDDLE"} else {_target setUnitPos "DOWN"};
65+
if (_unit distance _target > 2.5 && unitPos _unit == "DOWN" && behaviour _unit != "STEALTH" && !_combat) then {_unit setUnitPos "AUTO"};
66+
} else {
67+
_unit setUnitPos "MIDDLE";
6468
};
65-
if (_unit distance _target > 2.5 && unitPos _unit == "DOWN" && behaviour _unit != "STEALTH" && !_combat) then {_unit setUnitPos "AUTO"};
66-
} else {
67-
_unit setUnitPos "MIDDLE";
6869
};
6970
if(_unit != _target) then
7071
{

addons/AIO_AIMENU/useMedikit.sqf

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,25 @@ if (vehicle _target != _target && !(isPlayer _target)) then {
5252
};
5353

5454
if (vehicle _unit != _unit) then {doGetOut _unit; waitUntil {!alive _unit OR vehicle _unit == _unit}; sleep 2};
55-
56-
if !(_cover) then
57-
{
58-
_unit doWatch objNull;
59-
if (_target != player) then {
60-
if (_combat) then {
61-
_target forcespeed 1;
62-
_unit setUnitPos "MIDDLE";
55+
if !(isPlayer _target) then {
56+
if (!_cover) then
57+
{
58+
_unit doWatch objNull;
6359
if (_target != player) then {
64-
if (_currentComm == 2) then {_target doMove _pos};
65-
if (_currentComm == 1) then {doStop _target};
60+
if (_combat) then {
61+
_target forcespeed 1;
62+
_unit setUnitPos "MIDDLE";
63+
if (_target != player) then {
64+
if (_currentComm == 2) then {_target doMove _pos};
65+
if (_currentComm == 1) then {doStop _target};
66+
};
67+
} else {doStop _target};
68+
if (behaviour _target != "STEALTH") then {_target setUnitPos "MIDDLE"} else {_target setUnitPos "DOWN"};
6669
};
67-
} else {doStop _target};
68-
if (behaviour _target != "STEALTH") then {_target setUnitPos "MIDDLE"} else {_target setUnitPos "DOWN"};
70+
if (_unit distance _target > 2.5 && unitPos _unit == "DOWN" && _behav != "STEALTH" && !_combat) then {_unit setUnitPos "AUTO"};
71+
} else {
72+
_unit setUnitPos "MIDDLE";
6973
};
70-
if (_unit distance _target > 2.5 && unitPos _unit == "DOWN" && _behav != "STEALTH" && !_combat) then {_unit setUnitPos "AUTO"};
71-
} else {
72-
_unit setUnitPos "MIDDLE";
7374
};
7475
if(_unit != _target) then
7576
{
@@ -93,7 +94,7 @@ if(_unit != _target) then
9394
sleep 0.5;
9495
};
9596
};
96-
doStop _target;
97+
if !(isPlayer _target) then {doStop _target};
9798
if (alive _unit && alive _target && _unit distance _tarPos < 2.5) then {
9899
_unit doMove (getPos _unit);
99100
sleep 0.5;

0 commit comments

Comments
 (0)