From 5c64f10c1689c7c3e80d2dd26417c8d8709479b1 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Sat, 24 Jun 2023 13:55:26 +0200 Subject: [PATCH] Common - Updated CBA_fnc_removeBinocularMagazine (#1556) * Update fnc_removeBinocularMagazine.sqf * Update fnc_removeBinocularMagazine.sqf * Update fnc_removeBinocularMagazine.sqf --- addons/common/fnc_removeBinocularMagazine.sqf | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/addons/common/fnc_removeBinocularMagazine.sqf b/addons/common/fnc_removeBinocularMagazine.sqf index c2077c784a..14aad35aa0 100644 --- a/addons/common/fnc_removeBinocularMagazine.sqf +++ b/addons/common/fnc_removeBinocularMagazine.sqf @@ -5,6 +5,8 @@ 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 @@ -17,7 +19,7 @@ Examples: (end) Author: - commy2 + commy2, johnb43 ---------------------------------------------------------------------------- */ SCRIPT(removeBinocularMagazine); @@ -25,11 +27,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 (_unit call CBA_fnc_binocularMagazine);