Skip to content

Commit

Permalink
Admin Menu - Don't strip medic/eng when resetting gear to default
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror committed Feb 16, 2025
1 parent 99be6ac commit 6c4c2f0
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions addons/adminMenu/functions/fnc_uihook_resetGearButton.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,21 @@ if (_selectedLoadout == "") then {
_selectedUnit setVariable ["F_Gear", nil, true];
} else {
_selectedUnit setVariable ["F_Gear", _selectedLoadout, true];
};

if (_selectedLoadout == "sm") then {
_selectedUnit setVariable [QACEGVAR(medical,medicClass), 1, true];
} else {
_selectedUnit setVariable [QACEGVAR(medical,medicClass), 0, true];
// If changing loadout, also add/remove medic/eng abilities
if (_selectedLoadout == "sm") then {
_selectedUnit setVariable [QACEGVAR(medical,medicClass), 1, true];
} else {
_selectedUnit setVariable [QACEGVAR(medical,medicClass), 0, true];
};

if (_selectedLoadout in ["eng","vicc","vicl","vicd","pilot"]) then {
_selectedUnit setVariable ["ACE_isEngineer", true, true];
} else {
_selectedUnit setVariable ["ACE_isEngineer", false, true];
};
};

if (_selectedLoadout in ["eng","vicc","vicl","vicd","pilot"]) then {
_selectedUnit setVariable ["ACE_isEngineer", true, true];
} else {
_selectedUnit setVariable ["ACE_isEngineer", false, true];
};

[QGVAR(resetGear), [_selectedUnit], [_selectedUnit]] call CBA_fnc_targetEvent;

Expand Down

0 comments on commit 6c4c2f0

Please sign in to comment.