Skip to content

Commit 2e4dab9

Browse files
authored
Fixed a couple of minor issues
1 parent e0b04d3 commit 2e4dab9

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed

addons/AIO_AIMENU/Functions/CopyMyStance.sqf

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,19 @@ AIO_copy_my_stance_fnc =
4141
};
4242
AIO_playerStance = "";
4343
if (AIO_copyExactStance) then {
44+
_currentComm = [];
45+
for "_i" from 0 to (count AIO_copyStanceUnits - 1) do
46+
{
47+
_currentComm set [_i, [0]];
48+
if (currentCommand (AIO_copyStanceUnits select _i) == "STOP") then {_currentComm set [_i, [1]]};
49+
if (currentCommand (AIO_copyStanceUnits select _i) == "MOVE" OR currentCommand (AIO_copyStanceUnits select _i) == "") then {
50+
_dest = expectedDestination (AIO_copyStanceUnits select _i);
51+
if (_dest select 1 != "DoNotPlanFormation" OR formLeader (AIO_copyStanceUnits select _i)!= player) then {
52+
_pos = _dest select 0;
53+
_currentComm set [_i, [2, _pos]];
54+
};
55+
};
56+
};
4457
{
4558
_team = assignedTeam _x;
4659
_playerGrp = group player;
@@ -54,7 +67,12 @@ AIO_copy_my_stance_fnc =
5467
_x assignTeam _team;
5568
_playerGrp selectLeader _leader;
5669
deleteGroup _tempGrp;
57-
} forEach (units group player - [player]);
70+
} forEach AIO_copyStanceUnits;
71+
for "_i" from 0 to (count AIO_copyStanceUnits) do
72+
{
73+
if ((_currentComm select _i) select 0 == 1) then {doStop (AIO_copyStanceUnits select _i)};
74+
if ((_currentComm select _i) select 0 == 2) then {(AIO_copyStanceUnits select _i) doMove ((_currentComm select _i) select 1)};
75+
};
5876
sleep 1;
5977
_stanceVar = player getVariable "AIO_StanceAnimChangedEH";
6078
if (isNil "_stanceVar") then {

addons/AIO_AIMENU/XEH_preInit.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Finally, to bind your function to a key, call CBA_fnc_addKeybind:
5151
*/
5252

5353

54-
["AIO_useVoiceChat", "CHECKBOX", "Use Voice Chat", "All-In-One Command Menu" ,false, 1] call CBA_Settings_fnc_init;
54+
["AIO_useVoiceChat", "CHECKBOX", "Use Voice Chat", "All-In-One Command Menu" ,true, 1] call CBA_Settings_fnc_init;
5555
["AIO_Init_Message", "CHECKBOX", "Show Initialization Message", "All-In-One Command Menu" ,true, 1] call CBA_Settings_fnc_init;
5656
["AIO_Zeus_Enabled", "CHECKBOX", "Create Zeus Module", "All-In-One Command Menu" ,true, 1] call CBA_Settings_fnc_init;
5757
["AIO_HC_Module_Enabled", "CHECKBOX", "Create High Command Module", "All-In-One Command Menu", false, 1] call CBA_Settings_fnc_init;

addons/AIO_AIMENU/switchStance.sqf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ if (_index == -1) then {
2929
if (AIO_useVoiceChat) then {
3030
player groupRadio Format["SentUnitPos%1", AIO_posSelectIndex];
3131
};
32+
_currentComm = [];
33+
for "_i" from 0 to (count _units - 1) do
34+
{
35+
_currentComm set [_i, [0]];
36+
if (currentCommand (_units select _i) == "STOP") then {_currentComm set [_i, [1]]};
37+
if (currentCommand (_units select _i) == "MOVE" OR currentCommand (_units select _i) == "") then {
38+
_dest = expectedDestination (_units select _i);
39+
if (_dest select 1 != "DoNotPlanFormation" OR formLeader (_units select _i)!= player) then {
40+
_pos = _dest select 0;
41+
_currentComm set [_i, [2, _pos]];
42+
};
43+
};
44+
};
3245
{
3346
_team = assignedTeam _x;
3447
_playerGrp = group player;
@@ -43,6 +56,11 @@ if (_index == -1) then {
4356
_playerGrp selectLeader _leader;
4457
deleteGroup _tempGrp;
4558
} forEach _units;
59+
for "_i" from 0 to (count _units) do
60+
{
61+
if ((_currentComm select _i) select 0 == 1) then {doStop (_units select _i)};
62+
if ((_currentComm select _i) select 0 == 2) then {(_units select _i) doMove ((_currentComm select _i) select 1)};
63+
};
4664
sleep 1;
4765
{
4866
_stance = AIO_FullStanceArray select _index;

0 commit comments

Comments
 (0)