From 8d573ae60eac4e656899161ab6de2c17184457a8 Mon Sep 17 00:00:00 2001 From: ThomasAngel <30532050+rekterakathom@users.noreply.github.com> Date: Sun, 18 Feb 2024 14:54:46 +0200 Subject: [PATCH] Update fnc_doCallout (#355) * Allow leading slash Since Arma 3 v2.10, leading slashes are allowed for playSound3D, so no need to bother removing it. * Make callouts come from units head The callout is now played from the unit's eyePos instead of their position. --- addons/main/functions/fnc_doCallout.sqf | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/main/functions/fnc_doCallout.sqf b/addons/main/functions/fnc_doCallout.sqf index 1a094097..e012d36f 100644 --- a/addons/main/functions/fnc_doCallout.sqf +++ b/addons/main/functions/fnc_doCallout.sqf @@ -82,9 +82,6 @@ if (isNil "_cachedSounds") then { if (_sound select [0, 1] != "\") then { _sound = (getArray (configFile >> "CfgVoice" >> _speaker >> "directories") select 0) + _sound; }; - if (_sound select [0, 1] == "\") then { - _sound = _sound select [1]; - }; }; _cachedSounds set [_forEachIndex, _sound]; } forEach _cachedSounds; @@ -107,7 +104,7 @@ if (_cachedSounds isEqualTo []) exitWith { }; private _sound = selectRandom _cachedSounds; -playSound3D [_sound, _unit, isNull (objectParent _unit), getPosASL _unit, 5, pitch _unit, _distance]; +playSound3D [_sound, _unit, isNull (objectParent _unit), eyePos _unit, 5, pitch _unit, _distance]; [_unit, true] remoteExecCall ["setRandomLip", 0]; [{ _this remoteExecCall ["setRandomLip", 0];