Skip to content

Commit

Permalink
Fixed more bugs in the healing function+tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Leopard20 authored Aug 15, 2018
1 parent 15d62b5 commit 4317b75
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 33 deletions.
2 changes: 1 addition & 1 deletion addons/AIO_AIMENU/AIMenu.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ AIO_WayPoint_markers = [ [[["",[]]],[],"empty"],
[[["",[]]],[],"empty"],[[["",[]]],[],"empty"],[[["",[]]],[],"empty"],[[["",[]]],[],"empty"],[[["",[]]],[],"empty"]];

AIO_keyspressed = {
if (AIO_monitoring_enabled) exitWith {AIO_monitoring_disabled = true};
if (AIO_monitoring_enabled) exitWith {AIO_monitoring_disabled = true; hintSilent ""};
if (hcShownBar) then {[] execVM "AIO_AIMENU\Menus_HC.sqf"} else {[] execVM "AIO_AIMENU\Menus.sqf"};
if (AIO_AdvancedCtrlMode && AIO_Advanced_Ctrl) then {[] call AIO_cancel_driver_mode};
};
Expand Down
2 changes: 1 addition & 1 deletion addons/AIO_AIMENU/mount.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ _getInFnc =
_unit moveTo _targetPos;
};
sleep 0.2;
_lastPos = getPos _unit;
_lastPos = getPos _target;
while {currentCommand _unit == "STOP" && !(moveToCompleted _unit) && (alive _unit) && (alive _target)} do
{
if ((_target distance _lastPos) > 2) then {
Expand Down
31 changes: 16 additions & 15 deletions addons/AIO_AIMENU/useFirstAid.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,25 @@ if (vehicle _target != _target && !(isPlayer _target)) then {
};

if (vehicle _unit != _unit) then {doGetOut _unit; waitUntil {!alive _unit OR vehicle _unit == _unit}; sleep 2};

if !(_cover) then
{
_unit doWatch objNull;
if (_target != player) then {
if (_combat) then {
_target forcespeed 1;
_unit setUnitPos "MIDDLE";
if !(isPlayer _target) then {
if !(_cover) then
{
_unit doWatch objNull;
if (_target != player) then {
if (_currentComm == 2) then {_target doMove _pos};
if (_currentComm == 1) then {doStop _target};
if (_combat) then {
_target forcespeed 1;
_unit setUnitPos "MIDDLE";
if (_target != player) then {
if (_currentComm == 2) then {_target doMove _pos};
if (_currentComm == 1) then {doStop _target};
};
} else {doStop _target};
if (behaviour _target != "STEALTH") then {_target setUnitPos "MIDDLE"} else {_target setUnitPos "DOWN"};
};
} else {doStop _target};
if (behaviour _target != "STEALTH") then {_target setUnitPos "MIDDLE"} else {_target setUnitPos "DOWN"};
if (_unit distance _target > 2.5 && unitPos _unit == "DOWN" && behaviour _unit != "STEALTH" && !_combat) then {_unit setUnitPos "AUTO"};
} else {
_unit setUnitPos "MIDDLE";
};
if (_unit distance _target > 2.5 && unitPos _unit == "DOWN" && behaviour _unit != "STEALTH" && !_combat) then {_unit setUnitPos "AUTO"};
} else {
_unit setUnitPos "MIDDLE";
};
if(_unit != _target) then
{
Expand Down
33 changes: 17 additions & 16 deletions addons/AIO_AIMENU/useMedikit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,25 @@ if (vehicle _target != _target && !(isPlayer _target)) then {
};

if (vehicle _unit != _unit) then {doGetOut _unit; waitUntil {!alive _unit OR vehicle _unit == _unit}; sleep 2};

if !(_cover) then
{
_unit doWatch objNull;
if (_target != player) then {
if (_combat) then {
_target forcespeed 1;
_unit setUnitPos "MIDDLE";
if !(isPlayer _target) then {
if (!_cover) then
{
_unit doWatch objNull;
if (_target != player) then {
if (_currentComm == 2) then {_target doMove _pos};
if (_currentComm == 1) then {doStop _target};
if (_combat) then {
_target forcespeed 1;
_unit setUnitPos "MIDDLE";
if (_target != player) then {
if (_currentComm == 2) then {_target doMove _pos};
if (_currentComm == 1) then {doStop _target};
};
} else {doStop _target};
if (behaviour _target != "STEALTH") then {_target setUnitPos "MIDDLE"} else {_target setUnitPos "DOWN"};
};
} else {doStop _target};
if (behaviour _target != "STEALTH") then {_target setUnitPos "MIDDLE"} else {_target setUnitPos "DOWN"};
if (_unit distance _target > 2.5 && unitPos _unit == "DOWN" && _behav != "STEALTH" && !_combat) then {_unit setUnitPos "AUTO"};
} else {
_unit setUnitPos "MIDDLE";
};
if (_unit distance _target > 2.5 && unitPos _unit == "DOWN" && _behav != "STEALTH" && !_combat) then {_unit setUnitPos "AUTO"};
} else {
_unit setUnitPos "MIDDLE";
};
if(_unit != _target) then
{
Expand All @@ -93,7 +94,7 @@ if(_unit != _target) then
sleep 0.5;
};
};
doStop _target;
if !(isPlayer _target) then {doStop _target};
if (alive _unit && alive _target && _unit distance _tarPos < 2.5) then {
_unit doMove (getPos _unit);
sleep 0.5;
Expand Down

0 comments on commit 4317b75

Please sign in to comment.