Skip to content

Commit

Permalink
Adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBrostrom committed Jul 15, 2019
1 parent 993423e commit 00dae2f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions addons/safemode/functions/fn_setWeaponSafety.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@
*
* Arguments:
* 0: Unit <OBJECT>
* 3: State <BOOL>
* 1: Weapon <STRING>
* 2: State <BOOL>
*
* Return Value:
* None
*
* Example:
* [ACE_player, true] call ace_safemode_fnc_safeWeapon
* [ACE_player, true] call ace_safemode_fnc_setWeaponSafety
*
* Public: yes
* Public: no
*/

params [
["_unit", objNull, [objNull]],
["_weapon", objNull, [objNull]],
["_state", true, [true]]
];

private _safedWeapons = _unit getVariable [QGVAR(safedWeapons), []];

private _weapon = currentWeapon _unit;
_weapon = configName (configFile >> "CfgWeapons" >> _weapon);

private _muzzle = currentMuzzle _unit;
_muzzle = configName (configFile >> "CfgWeapons" >> _muzzle);

if !(_state isEqualTo (_weapon in _safedWeapons)) then {
[_unit, _weapon, _muzzle] call FUNC(lockSafety);
Expand Down

0 comments on commit 00dae2f

Please sign in to comment.