#1208 - Holster key also unholsters

This commit is contained in:
PabstMirror 2015-06-07 12:59:53 -05:00
parent be68284911
commit 6eb7497cdf

View File

@ -110,7 +110,18 @@ if !(hasInterface) exitWith {};
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
// Statement
[ACE_player] call FUNC(putWeaponAway);
if ((currentWeapon ACE_player) != "") then {
[ACE_player] call FUNC(putWeaponAway);
} else {
private ["_weapon"];
_weapon = switch (true) do {
case ((primaryWeapon ACE_player) != ""): {primaryWeapon ACE_player};
case ((handgunWeapon ACE_player) != ""): {handgunWeapon ACE_player};
case ((secondaryWeapon ACE_player) != ""): {secondaryWeapon ACE_player};
default {""};
};
if (_weapon != "") then {ACE_player selectWeapon _weapon};
};
true
},
{false},