Increased loudness of missles and rockets.

This commit is contained in:
ulteq 2015-06-13 17:43:27 +02:00
parent feec8a14b7
commit db68b6c155
3 changed files with 10 additions and 5 deletions

View File

@ -12,7 +12,7 @@ class CfgSounds {
titles[] = {};
};
class ACE_Combat_Deafness {
sound[] = {QUOTE(PATHTOF(sounds\deafness.ogg)),2,1};
sound[] = {QUOTE(PATHTOF(sounds\deafness.ogg)),1,1};
titles[] = {};
};
class ACE_Ring_Backblast {

View File

@ -53,7 +53,6 @@ GVAR(earRingingPFH) = [{
GVAR(beep2) = false;
};
if (!GVAR(beep2)) then {
systemChat format["Deafness %1", ((_unit getvariable [QGVAR(dv), 0]) - (_unit getvariable [QGVAR(prior), 0]))];
playSound "ACE_Combat_Deafness";
GVAR(beep2) = true;
GVAR(time3) = ACE_time + 5;

View File

@ -21,7 +21,7 @@
*/
#include "script_component.hpp"
private ["_silencer", "_audibleFireCoef", "_audibleFire", "_loudness", "_strength", "_vehAttenuation"];
private ["_silencer", "_audibleFireCoef", "_loudness", "_strength", "_vehAttenuation", "_magazine", "_initSpeed", "_ammoConfig", "_caliber", "_parentClasses"];
PARAMS_7(_object,_firer,_distance,_weapon,_muzzle,_mode,_ammo);
@ -49,8 +49,14 @@ if (_silencer != "") then {
_magazine = (getArray(configFile >> "CfgWeapons" >> _weapon >> "magazines")) select 0;
_initSpeed = getNumber(configFile >> "CfgMagazines" >> _magazine >> "initSpeed");
_caliber = getNumber(configFile >> "CfgAmmo" >> _ammo >> "ACE_caliber");
if (_caliber <= 0) then { _caliber = 6.5; };
_ammoConfig = (configFile >> "CfgAmmo" >> _ammo);
_caliber = getNumber(_ammoConfig >> "ACE_caliber");
_parentClasses = [_ammoConfig, true] call BIS_fnc_returnParents;
if ("RocketBase" in _parentClasses || "MissileBase" in _parentClasses) then {
_caliber = 200;
} else {
if (_caliber <= 0) then { _caliber = 6.5; };
};
_loudness = (_caliber ^ 1.25 / 10) * (_initspeed / 1000) * _audibleFireCoef / 5;
_strength = _vehAttenuation * (_loudness - (_loudness / 50 * _distance)); // linear drop off