From 20f0342384f651afa9e080ec0e6b810989adf5f4 Mon Sep 17 00:00:00 2001 From: rekterakathom <30532050+rekterakathom@users.noreply.github.com> Date: Sun, 2 Jul 2023 23:05:45 +0300 Subject: [PATCH 1/2] Allow leading slash Since Arma 3 v2.10, leading slashes are allowed for playSound3D, so no need to bother removing it. --- addons/main/functions/fnc_doCallout.sqf | 3 --- 1 file changed, 3 deletions(-) diff --git a/addons/main/functions/fnc_doCallout.sqf b/addons/main/functions/fnc_doCallout.sqf index 1a094097..a354eaf1 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; From 2947479fe16e629bd7ae2617942097dbbcf1364a Mon Sep 17 00:00:00 2001 From: rekterakathom <30532050+rekterakathom@users.noreply.github.com> Date: Sun, 2 Jul 2023 23:07:10 +0300 Subject: [PATCH 2/2] 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/main/functions/fnc_doCallout.sqf b/addons/main/functions/fnc_doCallout.sqf index a354eaf1..e012d36f 100644 --- a/addons/main/functions/fnc_doCallout.sqf +++ b/addons/main/functions/fnc_doCallout.sqf @@ -104,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];