Skip to content

Commit

Permalink
Admin Menu - Don't strip medic/eng when resetting gear to default (#651)
Browse files Browse the repository at this point in the history
* Admin Menu - Don't strip medic/eng when resetting gear to default

* Update fnc_uihook_resetGearButton.sqf
  • Loading branch information
PabstMirror authored Feb 17, 2025
1 parent 99be6ac commit 6af6832
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions addons/adminMenu/functions/fnc_uihook_resetGearButton.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ if (_selectedLoadout == "") then {
_selectedUnit setVariable ["F_Gear", _selectedLoadout, 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];
_selectedUnit setVariable [QACEGVAR(medical,medicClass), nil, true];
};

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

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

0 comments on commit 6af6832

Please sign in to comment.