Skip to content

Commit

Permalink
Rename and adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBrostrom committed Jul 15, 2019
1 parent 9feefa4 commit 993423e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion addons/safemode/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ PREP(lockSafety);
PREP(playChangeFiremodeSound);
PREP(setSafeModeVisual);
PREP(unlockSafety);
PREP(safeWeapon);
PREP(setWeaponSafety);
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Weapon <STRING>
* 2: Muzzle <STRING>
* 3: State <BOOL>
*
* Return Value:
* None
*
* Example:
* [ACE_player, currentWeapon ACE_player, currentMuzzle Ace_player, true] call ace_safemode_fnc_safeWeapon
* [ACE_player, true] call ace_safemode_fnc_safeWeapon
*
* Public: yes
*/

params [
["_unit", objNull, [objNull]],
["_weapon", "", [""]],
["_muzzle", "", [""]],
["_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);
};

0 comments on commit 993423e

Please sign in to comment.