diff --git a/addons/main/functions/fnc_doCallout.sqf b/addons/main/functions/fnc_doCallout.sqf index e012d36f..f985f0d6 100644 --- a/addons/main/functions/fnc_doCallout.sqf +++ b/addons/main/functions/fnc_doCallout.sqf @@ -74,15 +74,18 @@ if (isNil "_cachedSounds") then { _cachedSounds = getArray (_protocolConfig >> _callout); private _deleted = false; { - private _sound = _x; - if (_sound == "") then { - _sound = objNull; - _deleted = true; - } else { + private _sound = toLowerANSI _x; // playSound3D is case-insensitive + + // File extension must exist for playSound3D to work + if (_sound regexMatch ".+?\.(?:ogg|wss|wav|mp3)$/io") then { if (_sound select [0, 1] != "\") then { _sound = (getArray (configFile >> "CfgVoice" >> _speaker >> "directories") select 0) + _sound; }; + } else { + _sound = objNull; + _deleted = true; }; + _cachedSounds set [_forEachIndex, _sound]; } forEach _cachedSounds;