From 6a2cde659307d60bf1860a9eb91a276280487824 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Thu, 15 Sep 2022 19:57:01 +0200 Subject: [PATCH 1/3] Update fnc_removeBinocularMagazine.sqf --- addons/common/fnc_removeBinocularMagazine.sqf | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/addons/common/fnc_removeBinocularMagazine.sqf b/addons/common/fnc_removeBinocularMagazine.sqf index c2077c784a..2ab9981194 100644 --- a/addons/common/fnc_removeBinocularMagazine.sqf +++ b/addons/common/fnc_removeBinocularMagazine.sqf @@ -6,7 +6,7 @@ Description: Removes the magazine of the units rangefinder. Parameters: - _unit - A unit + _unit - A unit (must be local) Returns: None @@ -25,11 +25,4 @@ params [["_unit", objNull, [objNull]]]; if (!local _unit) exitWith {}; -private _binocular = binocular _unit; -private _selectBinocular = currentWeapon _unit isEqualTo _binocular; - -_unit addWeapon _binocular; - -if (_selectBinocular) then { - _unit selectWeapon _binocular; -}; +_unit removeBinocularItem (binocularMagazine _unit); From 337aa17a5036acd7548b5e1d29d7dc1c45ff9c35 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Thu, 15 Sep 2022 19:58:54 +0200 Subject: [PATCH 2/3] Update fnc_removeBinocularMagazine.sqf --- addons/common/fnc_removeBinocularMagazine.sqf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/common/fnc_removeBinocularMagazine.sqf b/addons/common/fnc_removeBinocularMagazine.sqf index 2ab9981194..15bdf9cf71 100644 --- a/addons/common/fnc_removeBinocularMagazine.sqf +++ b/addons/common/fnc_removeBinocularMagazine.sqf @@ -5,8 +5,10 @@ Function: CBA_fnc_removeBinocularMagazine Description: Removes the magazine of the units rangefinder. + Has to be executed on the machine where the unit is local. + Parameters: - _unit - A unit (must be local) + _unit - A unit Returns: None @@ -17,7 +19,7 @@ Examples: (end) Author: - commy2 + commy2, johnb43 ---------------------------------------------------------------------------- */ SCRIPT(removeBinocularMagazine); From 2eab3f70bc5d38e72886c3d7739c792b5d3141f9 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Thu, 15 Sep 2022 20:07:36 +0200 Subject: [PATCH 3/3] Update fnc_removeBinocularMagazine.sqf --- addons/common/fnc_removeBinocularMagazine.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/common/fnc_removeBinocularMagazine.sqf b/addons/common/fnc_removeBinocularMagazine.sqf index 15bdf9cf71..14aad35aa0 100644 --- a/addons/common/fnc_removeBinocularMagazine.sqf +++ b/addons/common/fnc_removeBinocularMagazine.sqf @@ -27,4 +27,4 @@ params [["_unit", objNull, [objNull]]]; if (!local _unit) exitWith {}; -_unit removeBinocularItem (binocularMagazine _unit); +_unit removeBinocularItem (_unit call CBA_fnc_binocularMagazine);