Files
DayZ-Epoch/dayz_code/compile/fn_surfaceNoise.sqf
Aaron Clark 76e9a0582e 0.1
2012-11-04 20:28:50 -06:00

20 lines
636 B
Plaintext

//Assess Terrain
private["_unit","_pos","_type","_typeA","_soundType","_soundVal","_array","_test"];
_unit = _this;
_pos = getPosATL _unit;
_type = surfaceType _pos;
_typeA = toArray _type;
_typeA set [0,"DEL"];
_typeA = _typeA - ["DEL"];
_type = toString _typeA;
_test = 0;
//diag_log ("FINDME: " + _type);
_soundType = getText (configFile >> "CfgSurfaces" >> _type >> "soundEnviron");
_soundVal = parseNumber format["%1",((getArray (configFile >> "CfgVehicles" >> "CAManBase" >> "SoundEnvironExt" >> _soundType) select 0) select 3)];
if (_soundVal == 0) then {
_soundVal = 25;
};
_array = [_soundType,_soundVal];
_array