mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Make hearing component compatible with glasses
This commit is contained in:
parent
fa7d0df2df
commit
755f6bcc6b
@ -29,8 +29,16 @@ GVAR(volumeAttenuation) = [1, GVAR(EarplugsVolume)] select _hasEarPlugsIn;
|
||||
|
||||
// Handle Headgear
|
||||
if (headgear ACE_player != "") then {
|
||||
private _protection = (getNumber (configFile >> "CfgWeapons" >> (headgear ACE_player) >> QGVAR(protection))) min 1;
|
||||
private _protection = getNumber (configFile >> "CfgWeapons" >> headgear ACE_player >> QGVAR(protection)) min 1;
|
||||
GVAR(damageCoefficent) = GVAR(damageCoefficent) * (1 - _protection);
|
||||
private _attenuation = (getNumber (configFile >> "CfgWeapons" >> (headgear ACE_player) >> QGVAR(lowerVolume))) min 1;
|
||||
private _attenuation = getNumber (configFile >> "CfgWeapons" >> headgear ACE_player >> QGVAR(lowerVolume)) min 1;
|
||||
GVAR(volumeAttenuation) = GVAR(volumeAttenuation) * (1 - _attenuation);
|
||||
};
|
||||
|
||||
// Handle Goggles
|
||||
if (goggles ACE_player != "") then {
|
||||
private _protection = getNumber (configFile >> "CfgGlasses" >> goggles ACE_player >> QGVAR(protection)) min 1;
|
||||
GVAR(damageCoefficent) = GVAR(damageCoefficent) * (1 - _protection);
|
||||
private _attenuation = getNumber (configFile >> "CfgGlasses" >> goggles ACE_player >> QGVAR(lowerVolume)) min 1;
|
||||
GVAR(volumeAttenuation) = GVAR(volumeAttenuation) * (1 - _attenuation);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user