Skip to content

Commit 0aea587

Browse files
committed
Merge pull request acemod#1074 from acemod/hotfixAmbianceSoundsModule
fix removeWhiteSpace function name in ambiance sound module
2 parents 19e8d7b + ddf3205 commit 0aea587

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf

+19-19
Original file line numberDiff line numberDiff line change
@@ -26,39 +26,39 @@ _activated = [_this,2,true,[true]] call BIS_fnc_param;
2626
// We only play this on the locality of the logic, since the sounds are broadcasted across the network
2727
if (_activated && local _logic) then {
2828
_ambianceSounds = [];
29-
_unparsedSounds = _logic getvariable ["soundFiles", ""];
30-
_minimalDistance = (_logic getvariable ["minimalDistance", 400]) max 1;
31-
_maximalDistance = (_logic getvariable ["maximalDistance", 10]) max _minimalDistance;
32-
_minDelayBetweensounds = (_logic getvariable ["minimalDelay", 10]) max 1;
33-
_maxDelayBetweenSounds = (_logic getvariable ["maximalDelay", 170]) max _minDelayBetweensounds;
34-
_volume = (_logic getvariable ["soundVolume", 30]) max 1;
35-
_followPlayers = _logic getvariable ["followPlayers", false];
29+
_unparsedSounds = _logic getVariable ["soundFiles", ""];
30+
_minimalDistance = (_logic getVariable ["minimalDistance", 400]) max 1;
31+
_maximalDistance = (_logic getVariable ["maximalDistance", 10]) max _minimalDistance;
32+
_minDelayBetweensounds = (_logic getVariable ["minimalDelay", 10]) max 1;
33+
_maxDelayBetweenSounds = (_logic getVariable ["maximalDelay", 170]) max _minDelayBetweensounds;
34+
_volume = (_logic getVariable ["soundVolume", 30]) max 1;
35+
_followPlayers = _logic getVariable ["followPlayers", false];
3636

3737
_splittedList = [_unparsedSounds, ","] call BIS_fnc_splitString;
3838

3939
_nilCheckPassedList = "";
4040
{
41-
_x = [_x] call EFUNC(common,string_removeWhiteSpace);
42-
_splittedList set [_foreachIndex, _x];
43-
}foreach _splittedList;
41+
_x = [_x] call EFUNC(common,stringRemoveWhiteSpace);
42+
_splittedList set [_forEachIndex, _x];
43+
}forEach _splittedList;
4444

4545
_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
4646
{
47-
if (isclass (missionConfigFile >> "CfgSounds" >> _x)) then {
48-
_ambianceSounds pushback (_soundPath + (getArray(missionConfigFile >> "CfgSounds" >> _x >> "sound") select 0));
47+
if (isClass (missionConfigFile >> "CfgSounds" >> _x)) then {
48+
_ambianceSounds pushBack (_soundPath + (getArray(missionConfigFile >> "CfgSounds" >> _x >> "sound") select 0));
4949
} else {
50-
if (isclass (configFile >> "CfgSounds" >> _x)) then {
51-
_ambianceSounds pushback ((getArray(configFile >> "CfgSounds" >> _x >> "sound") select 0));
50+
if (isClass (configFile >> "CfgSounds" >> _x)) then {
51+
_ambianceSounds pushBack ((getArray(configFile >> "CfgSounds" >> _x >> "sound") select 0));
5252
};
5353
};
54-
}foreach _splittedList;
54+
}forEach _splittedList;
5555

56-
if (count _ambianceSounds == 0) exitwith {};
56+
if (count _ambianceSounds == 0) exitWith {};
5757
{
5858
if !([".", _x, true] call BIS_fnc_inString) then {
59-
_ambianceSounds set [_foreachIndex, _x + ".wss"];
59+
_ambianceSounds set [_forEachIndex, _x + ".wss"];
6060
};
61-
}foreach _ambianceSounds;
61+
}forEach _ambianceSounds;
6262

6363
[{
6464
private ["_args", "_logic", "_ambianceSounds", "_minimalDistance", "_maximalDistance", "_minDelayBetweensounds", "_maxDelayBetweenSounds", "_volume", "_followPlayers","_lastTimePlayed", "_newPos"];
@@ -68,7 +68,7 @@ if (_activated && local _logic) then {
6868
_maxDelayBetweenSounds = _args select 5;
6969
_lastTimePlayed = _args select 8;
7070

71-
if (!alive _logic) exitwith {
71+
if (!alive _logic) exitWith {
7272
[(_this select 1)] call cba_fnc_removePerFrameHandler;
7373
};
7474

0 commit comments

Comments
 (0)