Skip to content

Commit 97b5e5a

Browse files
committed
v1.0.2
1 parent a996fa6 commit 97b5e5a

File tree

12 files changed

+59
-18
lines changed

12 files changed

+59
-18
lines changed

@AIO_SPPack/AIO.paa

-19.9 KB
Binary file not shown.

@AIO_SPPack/addons/AIO_AIMENU.pbo

1.28 KB
Binary file not shown.

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

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
_display = findDisplay 46;
22
if (AIO_enableSuperPilot) then {
33
AIO_vehiclePlayer = vehicle player;
4+
AIO_vehiclePlayer land "NONE";
45
AIO_vehiclePlayer setVariable ["AIO_flightHeight", 50];
56
AIO_vehiclePlayer setVariable ["AIO_isBanking", false];
67
AIO_vehiclePlayer setVariable ["AIO_controlPitch", false];
@@ -41,8 +42,13 @@ if (AIO_enableSuperPilot) then {
4142

4243
_vehiclePlayer setVariable ["AIO_AiPilot", false];
4344

44-
if (_ctrl) then {
45+
if (_ctrl && (_vehiclePlayer getVariable ["AIO_loiter", 0]) == 0) then {
4546
_vehiclePlayer setVariable ["AIO_forcePitch", !_forcePitch];
47+
if !(_forcePitch) then {
48+
if ((_vehiclePlayer getVariable ["AIO_flightHeight", 40]) < 25) then {
49+
_vehiclePlayer setVariable ["AIO_flightHeight", 25];
50+
};
51+
};
4652
};
4753
};
4854
case 31: //s
@@ -57,8 +63,13 @@ if (AIO_enableSuperPilot) then {
5763

5864
_vehiclePlayer setVariable ["AIO_AiPilot", false];
5965

60-
if (_ctrl) then {
66+
if (_ctrl && (_vehiclePlayer getVariable ["AIO_loiter", 0]) == 0) then {
6167
_vehiclePlayer setVariable ["AIO_forcePitch", !_forcePitch];
68+
if !(_forcePitch) then {
69+
if ((_vehiclePlayer getVariable ["AIO_flightHeight", 40]) < 25) then {
70+
_vehiclePlayer setVariable ["AIO_flightHeight", 25];
71+
};
72+
};
6273
};
6374
};
6475
case 30: //a
@@ -79,6 +90,9 @@ if (AIO_enableSuperPilot) then {
7990

8091
_vehiclePlayer setVariable ["AIO_loiterCenter", ((getPosASLVisual _vehiclePlayer) vectorAdd (([(vectorDirVisual _vehiclePlayer), 90] call BIS_fnc_rotateVector2D) apply {_x*100}))];
8192
//TEST_POINTS = [ ((getPosASLVisual _vehiclePlayer) vectorAdd (([(vectorDirVisual _vehiclePlayer), 90] call BIS_fnc_rotateVector2D) apply {_x*100}))];
93+
if ((_vehiclePlayer getVariable ["AIO_flightHeight", 40]) < 25) then {
94+
_vehiclePlayer setVariable ["AIO_flightHeight", 25];
95+
};
8296
} else {
8397
"AIO_helicopter_UI" cutFadeOut 0; ("AIO_helicopter_UI" call BIS_fnc_rscLayer) cutRsc ["AIO_cruiseUI", "PLAIN", -1 , false];
8498
_vehiclePlayer setVariable ["AIO_forcePitch", false];
@@ -115,6 +129,9 @@ if (AIO_enableSuperPilot) then {
115129

116130
_vehiclePlayer setVariable ["AIO_loiterCenter", ((getPosASLVisual _vehiclePlayer) vectorAdd (([(vectorDirVisual _vehiclePlayer), -90] call BIS_fnc_rotateVector2D) apply {_x*100}))];
117131
//TEST_POINTS = [ ((getPosASLVisual _vehiclePlayer) vectorAdd (([(vectorDirVisual _vehiclePlayer), -90] call BIS_fnc_rotateVector2D) apply {_x*100}))];
132+
if ((_vehiclePlayer getVariable ["AIO_flightHeight", 40]) < 25) then {
133+
_vehiclePlayer setVariable ["AIO_flightHeight", 25];
134+
};
118135
} else {
119136
"AIO_helicopter_UI" cutFadeOut 0; ("AIO_helicopter_UI" call BIS_fnc_rscLayer) cutRsc ["AIO_cruiseUI", "PLAIN", -1 , false];
120137
_vehiclePlayer setVariable ["AIO_forcePitch", false];
@@ -149,7 +166,9 @@ if (AIO_enableSuperPilot) then {
149166
};
150167
};
151168
if (_shift) then {
169+
_vehiclePlayer land "NONE";
152170
_vehiclePlayer engineOn true;
171+
153172
if (_vehiclePlayer getVariable ["AIO_forcePitch", false]) then {
154173
_height = ((_vehiclePlayer getVariable ["AIO_flightHeight", 50])+5) min 500;
155174
[0, (formatText ["Flight Height: %1 m", parseText format ["<t color='#FFFF00'>%1", _height]])] call AIO_fnc_customHint;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ _id = _display displayAddEventHandler ["KeyDown", {
4747
};
4848
if (_shift) then {
4949
_vehiclePlayer = vehicle player;
50+
_vehiclePlayer land "NONE";
5051
_vehiclePlayer engineOn true;
5152
_pos = getPosASL _vehiclePlayer;
5253
_flightHeight = (((_pos select 2) - ((getTerrainHeightASL _pos) max 0)) + 10) min 200;

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
params ["_veh", ["_addToSuperHeli", true]];
22

3-
private ["_pos", "_tempVeh", "_bb", "_pos", "_height", "_size"];
3+
private ["_tempVeh", "_bb", "_pos", "_height", "_size"];
44

55
_veh setVariable ["AIO_lastVelocity", velocity _veh];
66
_veh setVariable ["AIO_pitch", 0];
@@ -12,12 +12,12 @@ _veh setVariable ["AIO_flightHeight", 50];
1212
_vehType = typeOf _veh;
1313

1414
//create a duplicated model for analysis
15-
_tempVeh = createVehicle [_vehType, [0,0,0]];
16-
17-
_tempVeh setPosASL [0,0,10000];
15+
_tempVeh = createVehicle [_vehType, [0,0,1000]];
1816

1917
_tempVeh enableSimulation false;
2018

19+
_tempVeh setPosASL [0,0,1000];
20+
2121
_tempVeh setVectorUp [0,0,1];
2222

2323
_bb = boundingBoxReal _tempVeh;
@@ -203,7 +203,7 @@ AIO_superHelicopters pushBackUnique _veh;
203203

204204
AIO_AI_superHelicopters pushBackUnique _veh;
205205

206-
if !(driver _veh in AIO_taskedUnits) then {_veh setVariable ["AIO_disableControls", false]};
206+
if !((driver _veh) in AIO_taskedUnits) then {_veh setVariable ["AIO_disableControls", false]; _veh land "NONE"};
207207

208208
_veh engineOn true;
209209

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
_hasContact = false;
107107
{
108108
_skid = _veh modelToWorldWorld _x;
109-
_skidbottom = _skid vectorDiff [0,0,0.4];
109+
_skidbottom = _skid vectorDiff [0,0,0.38];
110110
_hasContact = (terrainIntersectASL[_skid, _skidbottom] || {lineIntersects [_skid, _skidbottom, _veh]});
111111
if (_hasContact) exitWith {};
112112
} forEach _skids;

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,10 @@ _vehiclePlayer setVariable ["AIO_loiter", _loiter];
2525

2626
if (_loiter < 0) then {("AIO_helicopter_UI" call BIS_fnc_rscLayer) cutRsc ["AIO_loiterUI_left", "PLAIN", -1 , false]} else {("AIO_helicopter_UI" call BIS_fnc_rscLayer) cutRsc ["AIO_loiterUI_right", "PLAIN", -1 , false]};
2727

28-
((uiNamespace getVariable ["AIO_helicopter_UI", displayNull]) displayCtrl 1307) ctrlSetText str (floor _radius);
28+
((uiNamespace getVariable ["AIO_helicopter_UI", displayNull]) displayCtrl 1307) ctrlSetText str (floor _radius);
29+
30+
_vehiclePlayer land "NONE";
31+
32+
if ((_vehiclePlayer getVariable ["AIO_flightHeight", 40]) < 25) then {
33+
_vehiclePlayer setVariable ["AIO_flightHeight", 25];
34+
};

@AIO_SPPack/addons/AIO_AIMENU/functions/highCommand/fn_addHCGroup.sqf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@ if (count _units == 0) exitWith {};
88
_crew = [];
99
{
1010
_veh = vehicle _x;
11-
if (_veh != _x) then {_temp = fullCrew [_veh, "", false]; _temp = _temp apply {[_x select 0, _x select 1, _x select 3, _veh]}; {_crew = _crew + [_x]}
12-
forEach _temp};
11+
if (_veh != _x) then {
12+
_temp = fullCrew [_veh, "", false];
13+
_temp = _temp apply {[_x select 0, _x select 1, _x select 3, _veh]};
14+
{
15+
_crew pushBack _x
16+
} forEach _temp
17+
};
1318
} forEach _units;
1419

1520
_group = createGroup (side player);

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,21 @@ AIO_superPilotMode_subMenu =
208208
["Super Pilot",true],
209209
[parseText"<img color='#95ff44' image='\A3\ui_f\data\GUI\Rsc\RscDisplayGarage\helicopter_ca.paa'/><t font='PuristaBold'> Enable Super Pilot", [2], "", -5, [["expression", "
210210
_units = groupSelectedUnits player;
211-
_units = (_units select {_veh = vehicle _x; (_veh != _x && {_veh isKindOf 'Helicopter'})}) apply {vehicle _x};
211+
_vehs = [];
212212
{
213-
[_x] call AIO_fnc_analyzeHeli
213+
_veh = vehicle _x;
214+
if (_veh isKindOf 'Helicopter' && !(_veh in _vehs)) then {
215+
[_veh, true] call AIO_fnc_analyzeHeli;
216+
_vehs pushBack _veh
217+
};
214218
} forEach _units;
215219
"]], "1", "1"],
216220
[parseText"<img color='#f94a4a' image='\A3\ui_f\data\GUI\Rsc\RscDisplayGarage\helicopter_ca.paa'/><t font='PuristaBold'> Disable Super Pilot", [3], "", -5, [["expression", "
217221
_units = groupSelectedUnits player;
218-
_units = (_units select {_veh = vehicle _x; (_veh != _x && {_veh isKindOf 'Helicopter'})}) apply {vehicle _x};
222+
_units = (_units select {(vehicle _x) isKindOf 'Helicopter'}) apply {vehicle _x};
219223
AIO_superHelicopters = AIO_superHelicopters - _units;
220224
AIO_AI_superHelicopters = AIO_AI_superHelicopters - _units;
225+
if (count AIO_superHelicopters == 0) then {['AIO_helicopter_control', 'onEachFrame'] call BIS_fnc_removeStackedEventHandler}
221226
"]], "1", "1"]
222227
];
223228

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ _createZeusFnc =
1111
//AIO_curator_module = _group createUnit ["ModuleCurator_F", [0, 0, 0], [], 0, "NONE"];
1212
AIO_curator_module = "ModuleCurator_F" createVehicleLocal [0, 0, 0];
1313
AIO_curator_module setVariable ["owner", (name player)];
14-
_classes = '!(["a3_", str _x] call BIS_fnc_inString)' configClasses (configFile >> "CfgPatches");
14+
_classes = '!(["A3", configName _x, true] call BIS_fnc_inString)' configClasses (configFile >> "CfgPatches");
15+
1516
_classes = _classes apply {configName _x};
16-
activateAddons _classes;
17+
18+
_classes call BIS_fnc_activateAddons;
19+
1720
AIO_curator_module addCuratorAddons _classes;
1821

1922
AIO_curator_module addEventHandler [

0 commit comments

Comments
 (0)