diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 0fc2355000..3e5b2edee8 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -144,7 +144,6 @@ PREP(resetAllDefaults); PREP(restoreVariablesJIP); PREP(runAfterSettingsInit); PREP(sanitizeString); -PREP(selectWeaponMode); PREP(sendRequest); PREP(serverLog); PREP(setAllGear); @@ -298,6 +297,11 @@ DFUNC(canUseWeapon) = { _this call CBA_fnc_canUseWeapon; }; +DFUNC(selectWeaponMode) = { + ACE_DEPRECATED("ace_common_fnc_selectWeaponMode","3.7.0","CBA_fnc_selectWeapon"); + _this call CBA_fnc_selectWeapon; +}; + GVAR(syncedEvents) = HASH_CREATE; GVAR(showHudHash) = [] call FUNC(hashCreate); diff --git a/addons/common/functions/fnc_selectWeaponMode.sqf b/addons/common/functions/fnc_selectWeaponMode.sqf deleted file mode 100644 index 582f6fd4b2..0000000000 --- a/addons/common/functions/fnc_selectWeaponMode.sqf +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Author: commy2 - * Unit selects given muzzle and weapon mode. - * - * Arguments: - * 0: unit - * 1: weapon or Muzzle - * 2: weapon Mode - * - * Return Value: - * Successful? - * - * Example: - * [player, primaryWeapon player, "FullAuto"] call ace_common_fnc_selectWeaponMode - * - * Public: Yes - */ -#include "script_component.hpp" - -params ["_unit", "_muzzle", "_mode"]; - -private _index = 0; - -while { - _index < 100 && {currentMuzzle _unit != _muzzle || {currentWeaponMode _unit != _mode}} -} do { - _unit action ["SwitchWeapon", _unit, _unit, _index]; - _index = _index + 1; -}; - -_index < 100 // return