From c5ce72203df026bef5af8e7b7081982f85862ca6 Mon Sep 17 00:00:00 2001 From: SouDescolado Date: Sun, 17 May 2026 14:44:47 -0300 Subject: [PATCH] Make the delivery jobs actually take the weapon Fixes https://github.com/rekterakathom/Overthrow/issues/111 The function removeWeapon only removes equipped weapons This makes a check that, if it has the weapon equipped, remove it. Otherwise uses the function removeItem (Checks Uniform -> Vest -> Backpack, in that order) --- .../functions/actions/fn_talkToCiv.sqf | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/addons/overthrow_main/functions/actions/fn_talkToCiv.sqf b/addons/overthrow_main/functions/actions/fn_talkToCiv.sqf index 9abf4177..d53dedf5 100644 --- a/addons/overthrow_main/functions/actions/fn_talkToCiv.sqf +++ b/addons/overthrow_main/functions/actions/fn_talkToCiv.sqf @@ -133,13 +133,25 @@ if (_delivery isNotEqualTo []) then { [player, _itemcls] call { params ["_unit", "_cls"]; if (_cls isKindOf ["Rifle", configFile >> "CfgWeapons"]) exitWith { - _unit removeWeapon _cls; + if (_unit hasWeapon _cls) then { + _unit removeWeapon _cls; + } else { + _unit removeItem _cls; + } }; if (_cls isKindOf ["Launcher", configFile >> "CfgWeapons"]) exitWith { - _unit removeWeapon _cls; + if (_unit hasWeapon _cls) then { + _unit removeWeapon _cls; + } else { + _unit removeItem _cls; + } }; if (_cls isKindOf ["Pistol", configFile >> "CfgWeapons"]) exitWith { - _unit removeWeapon _cls; + if (_unit hasWeapon _cls) then { + _unit removeWeapon _cls; + } else { + _unit removeItem _cls; + } }; if (_cls isKindOf ["Binocular", configFile >> "CfgWeapons"]) exitWith { _unit removeItem _cls;