diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index 6d845139ba..c4f44bdcff 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -122,7 +122,7 @@ class CfgVehicles { class ACE_GetDown { displayName = "$STR_ACE_Interaction_GetDown"; distance = 5; - condition = QUOTE([_target] call DFUNC(canInteractWith)); + condition = QUOTE([_target] call DFUNC(canInteractWithCivilian)); statement = QUOTE([_target] call DFUNC(getDown)); showDisabled = 0; priority = 2.2; @@ -130,7 +130,7 @@ class CfgVehicles { class ACE_SendAway { displayName = "$STR_ACE_Interaction_SendAway"; distance = 5; - condition = QUOTE([_target] call DFUNC(canInteractWith)); + condition = QUOTE([_target] call DFUNC(canInteractWithCivilian)); statement = QUOTE([_target] call DFUNC(sendAway)); showDisabled = 0; priority = 2.0; diff --git a/addons/interaction/XEH_preInit.sqf b/addons/interaction/XEH_preInit.sqf index 5060138d56..6efa72778e 100644 --- a/addons/interaction/XEH_preInit.sqf +++ b/addons/interaction/XEH_preInit.sqf @@ -4,6 +4,7 @@ ADDON = false; PREP(addSelectableItem); PREP(applyButtons); +PREP(canInteractWithCivilian); PREP(canTapShoulder); PREP(getDoor); PREP(getDoorAnimations); diff --git a/addons/interaction/functions/fnc_canInteractWithCivilian.sqf b/addons/interaction/functions/fnc_canInteractWithCivilian.sqf new file mode 100644 index 0000000000..6408d66aa8 --- /dev/null +++ b/addons/interaction/functions/fnc_canInteractWithCivilian.sqf @@ -0,0 +1,11 @@ +// by commy2 + +#include "script_component.hpp" + +EXPLODE_2_PVT(_this,_unit,_isCivilian); + +if (isNil "_isCivilian") then {_isCivilian = true}; + +alive _unit +&& [side _unit != side ACE_player, side group _unit == civilian] select _isCivilian +//&& {count (weapons _unit) == 0} \ No newline at end of file