Skip to content

Commit 7bcb9d5

Browse files
committed
v1.1.2
1 parent 600fab1 commit 7bcb9d5

File tree

17 files changed

+113
-67
lines changed

17 files changed

+113
-67
lines changed

@AIO_SPPack/addons/AIO_AIMENU.pbo

2.02 KB
Binary file not shown.

@AIO_SPPack/addons/AIO_AIMENU/CustomMenus/cover.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class AIO_coverSubMenu {
6666
speechId = 0;
6767
};
6868
class Building {
69-
title = "<img color='#fffb44' image='\A3\ui_f\data\IGUI\Cfg\simpleTasks\types\getin_ca.paa'/><t font='PuristaBold'> Move into building %POINTED_TARGET_NAME</t>";
69+
title = "<img color='#fffb44' image='\A3\ui_f\data\IGUI\Cfg\simpleTasks\types\getin_ca.paa'/><t font='PuristaBold'> Move into building</t>";
7070
shortcuts[] = {6};
7171
shortcutsAction = "CommandingMenu5";
7272
show = "1";

@AIO_SPPack/addons/AIO_AIMENU/XEH_preInit.sqf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
["AIO_autoMedicEnabled", "CHECKBOX", "Enable Auto-Medic", ["All-In-One Command Menu", "Initialization"] ,false, 0] call CBA_Settings_fnc_init;
6363
["AIO_copyExactStance", "CHECKBOX", ["Use Exact Copy Stance", "Units follow the exact stance of player, including intermediate ones"], ["All-In-One Command Menu", "Initialization"] ,true, 0] call CBA_Settings_fnc_init;
6464
["AIO_useNumpadKeys", "LIST", ["Menu selection mode", "Choose the prefered method for selecting menu items"], ["All-In-One Command Menu", "Initialization"] ,[[false, true], ["Numeric Keys", "Numeric and Numpad Keys"], 0], 0] call CBA_Settings_fnc_init;
65+
["AIO_showMedicIcon", "CHECKBOX", "Show the medic icon when player is wounded", ["All-In-One Command Menu", "Initialization"] ,true, 0] call CBA_Settings_fnc_init;
6566
//zeus
6667
["AIO_Zeus_Enabled", "CHECKBOX", "Create Zeus Module", ["All-In-One Command Menu", "Zeus"] ,true, 1] call CBA_Settings_fnc_init;
6768
["AIO_forceActivateAddons", "CHECKBOX", ["Force-enable all mods", "Mission makers can deactivate some addons. You can force activate them."], ["All-In-One Command Menu", "Zeus"] ,false, 1] call CBA_Settings_fnc_init;

@AIO_SPPack/addons/AIO_AIMENU/functions/cheats/fn_addEHs.sqf

Lines changed: 55 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ _units pushBack player;
8787
_unit setVariable ["AIO_lastDeath", time];
8888
_unit setVariable ["AIO_killer", _killer];
8989
} else {
90-
_unit setVariable ["AIO_isDead", true];
9190
if (_unit != player) then {
9291
[_unit, _unit getVariable ["AIO_actionRevive", -1]] call BIS_fnc_holdActionRemove;
9392
};
@@ -103,34 +102,40 @@ _units pushBack player;
103102
AIO_ppVig ppEffectAdjust [1,1,0,[0.15,0,0,1],[1.0,0.5,0.5,1],[0.587,0.199,0.114,0],[1,1,0,0,0,0.2,1]];
104103
AIO_ppDynBlur ppEffectAdjust [1];
105104
AIO_ppRadBlur ppEffectAdjust [0.01, 0.01, 0.06, 0.06];
106-
(findDisplay 77823) closeDisplay 2;
105+
107106
{_x ppEffectCommit 0; _x ppEffectEnable true; _x ppEffectForceInNVG true} forEach [AIO_ppColor, AIO_ppVig, AIO_ppDynBlur, AIO_ppRadBlur];
108-
/*
109-
("BlackScreen" call BIS_fnc_rscLayer) cutRsc ["AIO_EmptyScreen", "PLAIN", -1 , false];
110-
_disp = uiNamespace getVariable ["BlackScreen", displayNull];
107+
108+
("AIO_BlackScreen" call BIS_fnc_rscLayer) cutRsc ["AIO_EmptyScreen", "PLAIN", -1 , false];
109+
_disp = uiNamespace getVariable ["AIO_BlackScreen", displayNull];
111110
_ctrl =_disp displayCtrl 1100;
112-
_ctrl ctrlSetText "You are unconscious. Wait for a medic.";
113-
*/
114-
if !(player getVariable ["AIO_timerActive", false]) then {
115-
[] spawn {
116-
_time = 0;
117-
_lastCheck = time;
118-
waitUntil {
119-
if (time - _lastCheck > 1) then {
120-
_time = _time + 1;
121-
_lastCheck = time;
122-
};
123-
(_time > 300) || (lifeState player != "INCAPACITATED")
111+
_ctrl ctrlSetText "Wait for a medic.";
112+
};
113+
114+
if (scriptDone (_unit getVariable ["AIO_deathTimer", scriptNull])) then {
115+
_h = _unit spawn {
116+
_unit = _this;
117+
_time = 0;
118+
_lastCheck = time;
119+
waitUntil {
120+
if (time - _lastCheck > 1) then {
121+
_time = _time + 1;
122+
_lastCheck = time;
124123
};
125-
if (lifeState player == "INCAPACITATED") then {player setDamage 1};
126-
player setVariable ["AIO_timerActive", false];
124+
(_time > 300) || (lifeState _unit != "INCAPACITATED")
127125
};
128-
player setVariable ["AIO_timerActive", true];
126+
if (lifeState _unit == "INCAPACITATED") then {_unit setDamage 1};
127+
128+
if (isPlayer _unit) then {
129+
("AIO_BlackScreen" call BIS_fnc_rscLayer) cutFadeOut 01;
130+
if !(isNil "AIO_ppColor") then {{ppEffectDestroy _x} forEach [AIO_ppColor, AIO_ppVig, AIO_ppDynBlur, AIO_ppRadBlur]};
131+
["AIO_medicIcon", "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
132+
};
133+
129134
};
135+
_unit setVariable ["AIO_deathTimer", _h];
130136
};
131137

132-
_damage = 0;
133-
138+
_damage = 0;
134139
} else {
135140
_unit setVariable ["AIO_damage", _damage];
136141
};
@@ -162,7 +167,7 @@ _units pushBack player;
162167
_unit allowDamage false;
163168
_unit setUnconscious true;
164169
if (_DELTA < 1) exitWith {_damage = 0};
165-
if (_DELTA >= 90 || _unit == player) then {
170+
if (_DELTA >= 60 || _unit == player) then {
166171
if (_unit != player) then {
167172
[_unit] call AIO_fnc_addAction;
168173

@@ -182,7 +187,6 @@ _units pushBack player;
182187
_unit setVariable ["AIO_lastDeath", time];
183188
_unit setVariable ["AIO_killer", _killer];
184189
} else {
185-
_unit setVariable ["AIO_isDead", true];
186190
if (_unit != player) then {
187191
[_unit, _unit getVariable ["AIO_actionRevive", -1]] call BIS_fnc_holdActionRemove;
188192
};
@@ -198,30 +202,38 @@ _units pushBack player;
198202
AIO_ppVig ppEffectAdjust [1,1,0,[0.15,0,0,1],[1.0,0.5,0.5,1],[0.587,0.199,0.114,0],[1,1,0,0,0,0.2,1]];
199203
AIO_ppDynBlur ppEffectAdjust [1];
200204
AIO_ppRadBlur ppEffectAdjust [0.01, 0.01, 0.06, 0.06];
201-
(findDisplay 77823) closeDisplay 2;
205+
202206
{_x ppEffectCommit 0; _x ppEffectEnable true; _x ppEffectForceInNVG true} forEach [AIO_ppColor, AIO_ppVig, AIO_ppDynBlur, AIO_ppRadBlur];
203-
/*
204-
("BlackScreen" call BIS_fnc_rscLayer) cutRsc ["AIO_EmptyScreen", "PLAIN", -1 , false];
205-
_disp = uiNamespace getVariable ["BlackScreen", displayNull];
207+
208+
("AIO_BlackScreen" call BIS_fnc_rscLayer) cutRsc ["AIO_EmptyScreen", "PLAIN", -1 , false];
209+
_disp = uiNamespace getVariable ["AIO_BlackScreen", displayNull];
206210
_ctrl =_disp displayCtrl 1100;
207-
_ctrl ctrlSetText "You are unconscious. Wait for a medic.";
208-
*/
209-
if !(player getVariable ["AIO_timerActive", false]) then {
210-
[] spawn {
211-
_time = 0;
212-
_lastCheck = time;
213-
waitUntil {
214-
if (time - _lastCheck > 1) then {
215-
_time = _time + 1;
216-
_lastCheck = time;
217-
};
218-
(_time > 300) || (lifeState player != "INCAPACITATED")
211+
_ctrl ctrlSetText "Wait for a medic.";
212+
213+
};
214+
215+
if (scriptDone (_unit getVariable ["AIO_deathTimer", scriptNull])) then {
216+
_h = _unit spawn {
217+
_unit = _this;
218+
_time = 0;
219+
_lastCheck = time;
220+
waitUntil {
221+
if (time - _lastCheck > 1) then {
222+
_time = _time + 1;
223+
_lastCheck = time;
219224
};
220-
if (lifeState player == "INCAPACITATED") then {player setDamage 1};
221-
player setVariable ["AIO_timerActive", false];
225+
(_time > 300) || (lifeState _unit != "INCAPACITATED")
226+
};
227+
if (lifeState _unit == "INCAPACITATED") then {_unit setDamage 1};
228+
229+
if (isPlayer _unit) then {
230+
("AIO_BlackScreen" call BIS_fnc_rscLayer) cutFadeOut 01;
231+
if !(isNil "AIO_ppColor") then {{ppEffectDestroy _x} forEach [AIO_ppColor, AIO_ppVig, AIO_ppDynBlur, AIO_ppRadBlur]};
232+
["AIO_medicIcon", "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
222233
};
223-
player setVariable ["AIO_timerActive", true];
234+
224235
};
236+
_unit setVariable ["AIO_deathTimer", _h];
225237
};
226238

227239
_damage = 0;

@AIO_SPPack/addons/AIO_AIMENU/functions/cheats/fn_fullHeal.sqf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
params ["_units"];
22
_units pushBack player;
3+
["AIO_medicIcon", "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
34
{
45
_unit = _x;
56
if (_unit == player && {lifeState player == "INCAPACITATED" || player getVariable ["ACE_isUnconscious", false]}) then {
6-
("BlackScreen" call BIS_fnc_rscLayer) cutFadeOut 01;
7+
("AIO_BlackScreen" call BIS_fnc_rscLayer) cutFadeOut 01;
78
if !(isNil "AIO_ppColor") then {{ppEffectDestroy _x} forEach [AIO_ppColor, AIO_ppVig, AIO_ppDynBlur, AIO_ppRadBlur]};
89
};
910
_unit setUnconscious false;

@AIO_SPPack/addons/AIO_AIMENU/functions/driver/fn_analyzeHeli.sqf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,16 @@ _veh setVariable ["AIO_skidPoints", _skids];
107107

108108
//Default heli mechanics is based on Littlebird, so adjust for other helicopters for realism
109109

110-
_hasContact = false;
110+
_hasContact = isTouchingGround _veh;
111+
112+
/*
111113
{
112114
_skid = _veh modelToWorldWorld _x;
113115
_skidbottom = _skid vectorDiff [0,0,0.25];
114116
_hasContact = count (lineIntersectsSurfaces [_skid, _skidbottom, _veh, objNull, true, 1, "GEOM", "FIRE"]) > 0;
115117
if (_hasContact) exitWith {};
116118
} forEach _skids;
119+
*/
117120

118121
if !(_addToSuperHeli) exitWith {_hasContact};
119122

@@ -161,7 +164,7 @@ if (_id == -1) then {
161164
if (_engineOn) then {
162165
_time = time;
163166
_vehicle setVariable ["AIO_engineOn", _time];
164-
_vehicle setVariable ["AIO_engineReady", _time + ((_time - (_vehicle getVariable ["AIO_engineOff", _time])) min 18)];
167+
_vehicle setVariable ["AIO_engineReady", _time + ((_time - (_vehicle getVariable ["AIO_engineOff", _time-18])) min 18)];
165168
} else {
166169
_vehicle setVariable ["AIO_engineOff", time];
167170
};

@AIO_SPPack/addons/AIO_AIMENU/functions/driver/fn_helicopterMechanics.sqf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
_currentCollective = _velocity select 2;
2323
_desiredColl = _veh getVariable ["AIO_collective", 0];
24-
if (_veh getVariable ["AIO_landContact", false]) then {_desiredColl = _desiredColl max -1};
24+
if (isTouchingGround _veh) then {_desiredColl = _desiredColl max -1};
2525

2626
_verticalVelocity = _currentCollective + _acc/_fps*(_desiredColl - _currentCollective);
2727

@@ -103,14 +103,15 @@
103103

104104
_skids = _veh getVariable ["AIO_skidPoints", []];
105105

106-
_hasContact = false;
106+
_hasContact = isTouchingGround _veh;
107+
/*
107108
{
108109
_skid = _veh modelToWorldWorld _x;
109110
_skidbottom = _skid vectorDiff [0,0,0.38];
110111
_hasContact = (terrainIntersectASL[_skid, _skidbottom] || {lineIntersects [_skid, _skidbottom, _veh]});
111112
if (_hasContact) exitWith {};
112113
} forEach _skids;
113-
114+
*/
114115
if !(_hasContact) then {
115116
_velocity set [2, _verticalVelocity - 0.75*_velocitySize*_lift/_fps];
116117
if !(_veh getVariable ["AIO_disableControls", false]) then {

@AIO_SPPack/addons/AIO_AIMENU/functions/driver/fn_pilotLoop.sqf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ waitUntil {
9393
} else {
9494
_vehHeight = _pos select 2;
9595
_terrainHeight = _vehHeight;
96-
if !(_veh getVariable ["AIO_landContact", false]) then {
96+
if !(isTouchingGround _veh) then {
9797
_cntContact = 0;
9898
_skids = _veh getVariable ["AIO_skidPoints", []];
9999
_contacts = [];
@@ -240,7 +240,7 @@ waitUntil {
240240

241241
_flightHeight = _veh getVariable ["AIO_flightHeight", 40];
242242

243-
if !(_veh getVariable ["AIO_landContact", false]) then {
243+
if !(isTouchingGround _veh) then {
244244
_cntContact = 0;
245245
_skids = _veh getVariable ["AIO_skidPoints", []];
246246
_contacts = [];

@AIO_SPPack/addons/AIO_AIMENU/functions/init/fn_init.sqf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ if (isNil "AIO_enableMod") then {
1717
AIO_FixedWatchDir = true;
1818
AIO_copyExactStance = true;
1919
AIO_autoMedicEnabled = false;
20+
AIO_showMedicIcon = true;
2021
[] spawn {
2122
if (allDisplays isEqualTo [findDisplay 0] || is3DEN) exitWith {};
2223

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

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ if (_cntMedic != 0) then {
6767
_medic = _suitableMedics select 0;
6868
_task = [_medic,0,0] call AIO_fnc_getTask;
6969
_queuePos = [0,1] select (_task == 4);
70-
[_medic, [4,_patient,60+time,0], _queuePos] call AIO_fnc_pushToQueue;
70+
[_medic, [4,_patient,time+90*_perMedic,0], _queuePos] call AIO_fnc_pushToQueue;
7171
_patient setVariable ["AIO_medic", _medic];
7272
if (_patient != player) then {
7373
if (behaviour _patient == "Combat") then {
@@ -78,6 +78,16 @@ if (_cntMedic != 0) then {
7878
[_patient, [1,_midWay,0,0], 0] call AIO_fnc_pushToQueue;
7979
[_patient, [2,_medic,time+120*_perMedic,0], 1] call AIO_fnc_pushToQueue;
8080
};
81+
} else {
82+
if (lifeState _patient == "INCAPACITATED" || AIO_showMedicIcon) then {
83+
_disp = uiNamespace getVariable ["AIO_BlackScreen", displayNull];
84+
_ctrl =_disp displayCtrl 1100;
85+
_ctrl ctrlSetText "A medic is coming to revive you.";
86+
["AIO_medicIcon", "onEachFrame", {
87+
params ["_medic"];
88+
drawIcon3D["\A3\ui_f\data\IGUI\Cfg\Cursors\select_ca.paa", [1,0.2,0.2,1], (_medic modelToWorldVisual (_medic selectionPosition "aimPoint")), 1, 1, 0, format["Medic, %1m", floor (_medic distance player)], 0, 0.0315, "PuristaMedium", "center", true];
89+
}, [_medic]] call BIS_fnc_addStackedEventHandler;
90+
};
8191
};
8292
if (count(_medic getVariable ["AIO_queue", []])+1 >= _perMedic) then {_availableMedics = _availableMedics - [_medic]};
8393
[_patient, _medic] call AIO_fnc_sync;
@@ -98,12 +108,23 @@ if (_cntMedic != 0) then {
98108
_medic = _suitableMedics select 0;
99109
_task = [_medic,0,0] call AIO_fnc_getTask;
100110
_queuePos = [0,1] select (_task == 4);
101-
[_medic, [4,_patient,60+time,0], _queuePos] call AIO_fnc_pushToQueue;
111+
[_medic, [4,_patient,time+90*_perMedic,0], _queuePos] call AIO_fnc_pushToQueue;
102112
_patient setVariable ["AIO_medic", _medic];
103113
[_patient, _medic] call AIO_fnc_sync;
114+
if (isPlayer _patient) then {
115+
["AIO_medicIcon", "onEachFrame", {
116+
if !(player getVariable ["ACE_isUnconscious", false]) exitWith {
117+
["AIO_medicIcon", "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
118+
};
119+
params ["_medic"];
120+
drawIcon3D["\A3\ui_f\data\IGUI\Cfg\Cursors\select_ca.paa", [1,0.2,0.2,1], (_medic modelToWorldVisual (_medic selectionPosition "aimPoint")), 1, 1, 0, format["Medic, %1m", floor (_medic distance player)], 0, 0.0315, "PuristaMedium", "center", true];
121+
}, [_medic]] call BIS_fnc_addStackedEventHandler;
122+
};
104123
};
105124
} forEach _special;
125+
106126
[_wounded] spawn {{_x directSay "SentHealthCritical"; sleep (0.5 + random 2)} forEach (_this select 0)};
127+
107128
} else {
108129
_unattended = _wounded;
109130
};
@@ -118,7 +139,7 @@ if (count _unattended > 0) then {
118139
if (count _medics == 0) exitWith {};
119140
_medics = [_medics, [], {_x distance player}, "ASCEND"] call BIS_fnc_sortBy;
120141
_medic = _medics select 0;
121-
[_medic, [4,player,80+time,0], 0] call AIO_fnc_pushToQueue;
142+
[_medic, [4,player,90+time,0], 0] call AIO_fnc_pushToQueue;
122143

123144
};
124145

0 commit comments

Comments
 (0)