From c0bad842cdd008217523ddb1bdb70ba1cf4ca78d Mon Sep 17 00:00:00 2001 From: Wakbub Date: Fri, 25 May 2018 22:26:43 +0200 Subject: [PATCH] Replace BIS function with engine command Replace BIS function (*BIS_fnc_getCfgData*) with with engine command (*getText*). Links: [BIS_fnc_getCfgData](https://community.bistudio.com/wiki/BIS_fnc_getCfgData) [getText](https://community.bistudio.com/wiki/getText) --- addons/accessory/fnc_switchAttachment.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/accessory/fnc_switchAttachment.sqf b/addons/accessory/fnc_switchAttachment.sqf index 45f87bb80..1814dbf57 100644 --- a/addons/accessory/fnc_switchAttachment.sqf +++ b/addons/accessory/fnc_switchAttachment.sqf @@ -18,7 +18,7 @@ Examples: (end) Author: - Robalo + Robalo, optimized by Anton ---------------------------------------------------------------------------- */ #include "script_component.hpp" @@ -67,8 +67,8 @@ if (!isNil "_switchItem") then { _unit addSecondaryWeaponItem _switchItem; }; }; - private _switchItemHintText = (__cfgWeapons >> _switchItem >> "MRT_SwitchItemHintText") call BIS_fnc_getCfgData; - if (!isNil "_switchItemHintText") then { + private _switchItemHintText = getText (__cfgWeapons >> _switchItem >> "MRT_SwitchItemHintText"); + if !(_switchItemHintText isEqualTo "") then { hintSilent format ["%1", _switchItemHintText]; }; playSound "click";