Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fnc_Say3dglobal - avoid issue with _distance and _params as Array #1725

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions addons/network/fnc_globalSay3d.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Description:

Parameters:
_objects - Object or array of objects that perform Say <OBJECT, ARRAY>
_params - [sound, maxTitlesDistance,speed] or "sound" <STRING, ARRAY>
_range - Maximum distance from camera to execute command (optional) <NUMBER>
_params - classname or parameter array - see biki: say3d <STRING, ARRAY>
_range - Maximum distance from camera to execute command - will be ignored if _params is an array (optional, default: nil) <NUMBER>

Returns:
Nothing
Expand All @@ -30,9 +30,7 @@ if (_objects isEqualType objNull) then {
_objects = [_objects];
};

if (!isNil "_distance") then {
_params = [_params, _distance];
};
if (!isNil "_distance" && { _params isEqualType "" } ) then { _params = [_params, _distance]; };

{
[_x, _params] remoteExecCall ["say3D"];
Expand Down
Loading