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_doCallout #355

Merged
merged 2 commits into from
Feb 18, 2024
Merged
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
5 changes: 1 addition & 4 deletions addons/main/functions/fnc_doCallout.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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];
Expand Down