@@ -26,39 +26,39 @@ _activated = [_this,2,true,[true]] call BIS_fnc_param;
26
26
// We only play this on the locality of the logic, since the sounds are broadcasted across the network
27
27
if (_activated && local _logic ) then {
28
28
_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 ];
36
36
37
37
_splittedList = [_unparsedSounds , " ," ] call BIS_fnc_splitString ;
38
38
39
39
_nilCheckPassedList = " " ;
40
40
{
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 ;
44
44
45
45
_soundPath = [(str missionConfigFile ), 0 , - 15 ] call BIS_fnc_trimString ;
46
46
{
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 ));
49
49
} 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 ));
52
52
};
53
53
};
54
- }foreach _splittedList ;
54
+ }forEach _splittedList ;
55
55
56
- if (count _ambianceSounds == 0 ) exitwith {};
56
+ if (count _ambianceSounds == 0 ) exitWith {};
57
57
{
58
58
if ! ([" ." , _x , true ] call BIS_fnc_inString ) then {
59
- _ambianceSounds set [_foreachIndex , _x + " .wss" ];
59
+ _ambianceSounds set [_forEachIndex , _x + " .wss" ];
60
60
};
61
- }foreach _ambianceSounds ;
61
+ }forEach _ambianceSounds ;
62
62
63
63
[{
64
64
private [" _args" , " _logic" , " _ambianceSounds" , " _minimalDistance" , " _maximalDistance" , " _minDelayBetweensounds" , " _maxDelayBetweenSounds" , " _volume" , " _followPlayers" ," _lastTimePlayed" , " _newPos" ];
@@ -68,7 +68,7 @@ if (_activated && local _logic) then {
68
68
_maxDelayBetweenSounds = _args select 5 ;
69
69
_lastTimePlayed = _args select 8 ;
70
70
71
- if (! alive _logic ) exitwith {
71
+ if (! alive _logic ) exitWith {
72
72
[(_this select 1 )] call cba_fnc_removePerFrameHandler ;
73
73
};
74
74
0 commit comments