mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #1074 from acemod/hotfixAmbianceSoundsModule
fix removeWhiteSpace function name in ambiance sound module
This commit is contained in:
commit
0aea587529
@ -26,39 +26,39 @@ _activated = [_this,2,true,[true]] call BIS_fnc_param;
|
|||||||
// We only play this on the locality of the logic, since the sounds are broadcasted across the network
|
// We only play this on the locality of the logic, since the sounds are broadcasted across the network
|
||||||
if (_activated && local _logic) then {
|
if (_activated && local _logic) then {
|
||||||
_ambianceSounds = [];
|
_ambianceSounds = [];
|
||||||
_unparsedSounds = _logic getvariable ["soundFiles", ""];
|
_unparsedSounds = _logic getVariable ["soundFiles", ""];
|
||||||
_minimalDistance = (_logic getvariable ["minimalDistance", 400]) max 1;
|
_minimalDistance = (_logic getVariable ["minimalDistance", 400]) max 1;
|
||||||
_maximalDistance = (_logic getvariable ["maximalDistance", 10]) max _minimalDistance;
|
_maximalDistance = (_logic getVariable ["maximalDistance", 10]) max _minimalDistance;
|
||||||
_minDelayBetweensounds = (_logic getvariable ["minimalDelay", 10]) max 1;
|
_minDelayBetweensounds = (_logic getVariable ["minimalDelay", 10]) max 1;
|
||||||
_maxDelayBetweenSounds = (_logic getvariable ["maximalDelay", 170]) max _minDelayBetweensounds;
|
_maxDelayBetweenSounds = (_logic getVariable ["maximalDelay", 170]) max _minDelayBetweensounds;
|
||||||
_volume = (_logic getvariable ["soundVolume", 30]) max 1;
|
_volume = (_logic getVariable ["soundVolume", 30]) max 1;
|
||||||
_followPlayers = _logic getvariable ["followPlayers", false];
|
_followPlayers = _logic getVariable ["followPlayers", false];
|
||||||
|
|
||||||
_splittedList = [_unparsedSounds, ","] call BIS_fnc_splitString;
|
_splittedList = [_unparsedSounds, ","] call BIS_fnc_splitString;
|
||||||
|
|
||||||
_nilCheckPassedList = "";
|
_nilCheckPassedList = "";
|
||||||
{
|
{
|
||||||
_x = [_x] call EFUNC(common,string_removeWhiteSpace);
|
_x = [_x] call EFUNC(common,stringRemoveWhiteSpace);
|
||||||
_splittedList set [_foreachIndex, _x];
|
_splittedList set [_forEachIndex, _x];
|
||||||
}foreach _splittedList;
|
}forEach _splittedList;
|
||||||
|
|
||||||
_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
|
_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;
|
||||||
{
|
{
|
||||||
if (isclass (missionConfigFile >> "CfgSounds" >> _x)) then {
|
if (isClass (missionConfigFile >> "CfgSounds" >> _x)) then {
|
||||||
_ambianceSounds pushback (_soundPath + (getArray(missionConfigFile >> "CfgSounds" >> _x >> "sound") select 0));
|
_ambianceSounds pushBack (_soundPath + (getArray(missionConfigFile >> "CfgSounds" >> _x >> "sound") select 0));
|
||||||
} else {
|
} else {
|
||||||
if (isclass (configFile >> "CfgSounds" >> _x)) then {
|
if (isClass (configFile >> "CfgSounds" >> _x)) then {
|
||||||
_ambianceSounds pushback ((getArray(configFile >> "CfgSounds" >> _x >> "sound") select 0));
|
_ambianceSounds pushBack ((getArray(configFile >> "CfgSounds" >> _x >> "sound") select 0));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}foreach _splittedList;
|
}forEach _splittedList;
|
||||||
|
|
||||||
if (count _ambianceSounds == 0) exitwith {};
|
if (count _ambianceSounds == 0) exitWith {};
|
||||||
{
|
{
|
||||||
if !([".", _x, true] call BIS_fnc_inString) then {
|
if !([".", _x, true] call BIS_fnc_inString) then {
|
||||||
_ambianceSounds set [_foreachIndex, _x + ".wss"];
|
_ambianceSounds set [_forEachIndex, _x + ".wss"];
|
||||||
};
|
};
|
||||||
}foreach _ambianceSounds;
|
}forEach _ambianceSounds;
|
||||||
|
|
||||||
[{
|
[{
|
||||||
private ["_args", "_logic", "_ambianceSounds", "_minimalDistance", "_maximalDistance", "_minDelayBetweensounds", "_maxDelayBetweenSounds", "_volume", "_followPlayers","_lastTimePlayed", "_newPos"];
|
private ["_args", "_logic", "_ambianceSounds", "_minimalDistance", "_maximalDistance", "_minDelayBetweensounds", "_maxDelayBetweenSounds", "_volume", "_followPlayers","_lastTimePlayed", "_newPos"];
|
||||||
@ -68,7 +68,7 @@ if (_activated && local _logic) then {
|
|||||||
_maxDelayBetweenSounds = _args select 5;
|
_maxDelayBetweenSounds = _args select 5;
|
||||||
_lastTimePlayed = _args select 8;
|
_lastTimePlayed = _args select 8;
|
||||||
|
|
||||||
if (!alive _logic) exitwith {
|
if (!alive _logic) exitWith {
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user