From e8a403a9ad18800a0aebed59e0f2241cfd7f2d7f Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sun, 12 Jun 2016 12:58:39 -0500 Subject: [PATCH] Only do gunbag things when target has a gunbag --- addons/gunbag/CfgVehicles.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/gunbag/CfgVehicles.hpp b/addons/gunbag/CfgVehicles.hpp index 7d23f16db1..bf73d63755 100644 --- a/addons/gunbag/CfgVehicles.hpp +++ b/addons/gunbag/CfgVehicles.hpp @@ -5,7 +5,7 @@ class CfgVehicles { class ACE_MainActions { class GVAR(WeapontoGunbag) { displayName = CSTRING(toGunbag); - condition = QUOTE([ARR_2(_player,_target)] call FUNC(canInteract) == 0); + condition = QUOTE(([_target] call FUNC(hasGunbag)) && {[ARR_2(_player,_target)] call FUNC(canInteract) == 0}); statement = QUOTE([ARR_2(_player,_target)] call FUNC(toGunbag)); showDisabled = 0; priority = 1; @@ -13,7 +13,7 @@ class CfgVehicles { }; class GVAR(WeaponoffGunbag) { displayName = CSTRING(offGunbag); - condition = QUOTE([ARR_2(_player,_target)] call FUNC(canInteract) == 1); + condition = QUOTE(([_target] call FUNC(hasGunbag)) && {[ARR_2(_player,_target)] call FUNC(canInteract) == 1}); statement = QUOTE([ARR_2(_player,_target)] call FUNC(offGunbag)); showDisabled = 0; priority = 1;