From 4824a40af127fcb04320728962517eae65a67fc5 Mon Sep 17 00:00:00 2001 From: OverlordZorn Date: Sun, 5 Jan 2025 20:35:08 +0100 Subject: [PATCH 1/2] fix _distance issue --- addons/network/fnc_globalSay3d.sqf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/network/fnc_globalSay3d.sqf b/addons/network/fnc_globalSay3d.sqf index febe02519c..bc414b1a25 100644 --- a/addons/network/fnc_globalSay3d.sqf +++ b/addons/network/fnc_globalSay3d.sqf @@ -30,9 +30,8 @@ if (_objects isEqualType objNull) then { _objects = [_objects]; }; -if (!isNil "_distance") then { - _params = [_params, _distance]; -}; +if (_params isEqualType "") then { _params = [_params]; }; +if (!isNil "_distance") then { _params set [1, _distance]; }; { [_x, _params] remoteExecCall ["say3D"]; From 91b71fc4793d8c469729d87b90d315358355da98 Mon Sep 17 00:00:00 2001 From: OverlordZorn Date: Sun, 5 Jan 2025 20:56:28 +0100 Subject: [PATCH 2/2] Update fnc_globalSay3d.sqf --- addons/network/fnc_globalSay3d.sqf | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/network/fnc_globalSay3d.sqf b/addons/network/fnc_globalSay3d.sqf index bc414b1a25..72e408cd60 100644 --- a/addons/network/fnc_globalSay3d.sqf +++ b/addons/network/fnc_globalSay3d.sqf @@ -9,8 +9,8 @@ Description: Parameters: _objects - Object or array of objects that perform Say - _params - [sound, maxTitlesDistance,speed] or "sound" - _range - Maximum distance from camera to execute command (optional) + _params - classname or parameter array - see biki: say3d + _range - Maximum distance from camera to execute command - will be ignored if _params is an array (optional, default: nil) Returns: Nothing @@ -30,8 +30,7 @@ if (_objects isEqualType objNull) then { _objects = [_objects]; }; -if (_params isEqualType "") then { _params = [_params]; }; -if (!isNil "_distance") then { _params set [1, _distance]; }; +if (!isNil "_distance" && { _params isEqualType "" } ) then { _params = [_params, _distance]; }; { [_x, _params] remoteExecCall ["say3D"];