mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
gj git
This commit is contained in:
parent
e747234443
commit
822bd22c97
@ -31,26 +31,23 @@ if (!GVAR(enableCombatDeafness)) exitWith {};
|
||||
if ((ACE_player != _object) && {(vehicle ACE_player) != _object}) exitWith {};
|
||||
if (_weapon in ["Throw", "Put"]) exitWith {};
|
||||
|
||||
_vehAttenuation = if ((ACE_player == (vehicle ACE_player)) || {isTurnedOut ACE_player}) then {1} else {GVAR(playerVehAttunation)};
|
||||
_vehAttenuation = if ((ACE_player == (vehicle ACE_player)) || {isTurnedOut ACE_player}) then {1} else {GVAR(playerVehAttenuation)};
|
||||
|
||||
if (_distance < 1) then {_distance = 1;};
|
||||
|
||||
_silencer = switch (_weapon) do {
|
||||
case (primaryWeapon _firer) : {(primaryWeaponItems _firer) select 0};
|
||||
case (secondaryWeapon _firer) : {(secondaryWeaponItems _firer) select 0};
|
||||
case (handgunWeapon _firer) : {(handgunItems _firer) select 0};
|
||||
case (primaryWeapon _firer) : {(primaryWeaponItems _firer) select 0};
|
||||
case (secondaryWeapon _firer) : {(secondaryWeaponItems _firer) select 0};
|
||||
case (handgunWeapon _firer) : {(handgunItems _firer) select 0};
|
||||
default {""};
|
||||
};
|
||||
|
||||
_audibleFireCoef = 1;
|
||||
//_audibleFireTimeCoef = 1;
|
||||
if (_silencer != "") then {
|
||||
_audibleFireCoef = getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "audibleFire");
|
||||
//_audibleFireTimeCoef = getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "audibleFireTime");
|
||||
};
|
||||
|
||||
_audibleFire = getNumber (configFile >> "CfgAmmo" >> _ammo >> "audibleFire");
|
||||
//_audibleFireTime = getNumber (configFile >> "CfgAmmo" >> _ammo >> "audibleFireTime");
|
||||
|
||||
_loudness = _audibleFireCoef * _audibleFire / 64;
|
||||
_strength = _vehAttenuation * (_loudness - (_loudness/50 * _distance)); // linear drop off
|
||||
|
@ -36,7 +36,18 @@ if (ACE_player != _vehicle) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_newAttenuation = switch (true) do {
|
||||
case (_effectType == ""): {1};
|
||||
case (_effectType == "CarAttenuation"): {0.5};
|
||||
case (_effectType == "RHS_CarAttenuation"): {0.5};
|
||||
case (_effectType == "OpenCarAttenuation"): {1};
|
||||
case (_effectType == "TankAttenuation"): {0.1};
|
||||
case (_effectType == "HeliAttenuation"): {0.3};
|
||||
case (_effectType == "OpenHeliAttenuation"): {0.9};
|
||||
case (_effectType == "SemiOpenHeliAttenuation"): {0.6};
|
||||
case (_effectType == "HeliAttenuationGunner"): {0.85};
|
||||
case (_effectType == "HeliAttenuationRamp"): {0.85};
|
||||
default {1};
|
||||
};
|
||||
};
|
||||
@ -44,4 +55,3 @@ if (ACE_player != _vehicle) then {
|
||||
TRACE_2("New vehicle attenuation",_vehicle,_newAttenuation);
|
||||
|
||||
GVAR(playerVehAttenuation) = _newAttenuation;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user