Skip to content

Commit

Permalink
Merge pull request #2359 from acemod/fixRestoreGear
Browse files Browse the repository at this point in the history
fix restore gear
  • Loading branch information
thojkooi committed Sep 5, 2015
2 parents 9c7f742 + 9e1ae58 commit 446f367
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions addons/respawn/functions/fnc_restoreGear.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,18 @@ _activeWeapon = _activeWeaponAndMuzzle select 0;
_activeMuzzle = _activeWeaponAndMuzzle select 1;
_activeWeaponMode = _activeWeaponAndMuzzle select 2;

if (_activeMuzzle != "" and _activeMuzzle != _activeWeapon) then {
if (!(_activeMuzzle isEqualTo "") and
!(_activeMuzzle isEqualTo _activeWeapon) and
(_activeMuzzle in getArray (configfile >> "CfgWeapons" >> _activeWeapon >> "muzzles"))) then {

_unit selectWeapon _activeMuzzle;
} else {
if (_activeWeapon != "") then {
if (!(_activeWeapon isEqualTo "")) then {
_unit selectWeapon _activeWeapon;
};
};

if (currentWeapon _unit != "") then {
if (!(currentWeapon _unit isEqualTo "")) then {
private ["_index"];
_index = 0;
while {
Expand Down

0 comments on commit 446f367

Please sign in to comment.