Remove Debug

This commit is contained in:
PabstMirror 2015-04-10 23:51:07 -05:00
parent 0edcf03e12
commit ae064359f6
3 changed files with 10 additions and 9 deletions

View File

@ -1,12 +1,14 @@
#include "script_component.hpp"
if (!hasInterface) exitWith {};
GVAR(currentDeafness) = 0;
GVAR(newStrength) = 0;
GVAR(playerVehAttunation) = 1;
// Spawn volume updating process
[FUNC(updateVolume), 0.1, [] ] call CBA_fnc_addPerFrameHandler;
GVAR(playerVehAttunation) = 1;
//Update veh attunation when player veh changes
["playerVehicleChanged", {_this call FUNC(updatePlayerVehicleAttunation);}] call EFUNC(common,addEventHandler);
["playerTurretChanged", {_this call FUNC(updatePlayerVehicleAttunation);}] call EFUNC(common,addEventHandler);

View File

@ -21,17 +21,17 @@
*/
#include "script_component.hpp"
private ["_silencer", "_audibleFireCoef", "_loudness", "_strength"];
private ["_silencer", "_audibleFireCoef", "_loudness", "_strength", "_vehAttenuation"];
PARAMS_7(_object,_firer,_distance,_weapon,_muzzle,_mode,_ammo);
//Only run if combatDeafness enabled:
if (!GVAR(enableCombatDeafness)) exitWith {};
//Only run if firedNear object is player or player's vehicle:
if ((ACE_player != (_this select 0)) && {(vehicle ACE_player) != (_this select 0)}) exitWith {};
if ((ACE_player != _object) && {(vehicle ACE_player) != _object}) exitWith {};
if (_weapon in ["Throw", "Put"]) exitWith {};
_attenuation = 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(playerVehAttunation)};
if (_distance < 1) then {_distance = 1;};
@ -53,7 +53,7 @@ _audibleFire = getNumber (configFile >> "CfgAmmo" >> _ammo >> "audibleFire");
//_audibleFireTime = getNumber (configFile >> "CfgAmmo" >> _ammo >> "audibleFireTime");
_loudness = _audibleFireCoef * _audibleFire / 64;
_strength = _attenuation * (_loudness - (_loudness/50 * _distance)); // linear drop off
_strength = _vehAttenuation * (_loudness - (_loudness/50 * _distance)); // linear drop off
if (_strength < 0.01) exitWith {};

View File

@ -25,12 +25,11 @@ if (ACE_player == _vehicle) then {
} else {
_effectType = "";
_turretPath = [ACE_player] call EFUNC(common,getTurretIndex);
systemChat format ["_turretPath %1", _turretPath];
_effectType = getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "attenuationEffectType");
systemChat format ["Veh EffectType %1", _effectType];
if (!(_turretPath isEqualTo [])) then {
_turretConfig = [(configFile >> "CfgVehicles" >> (typeOf _vehicle)), _turretPath] call EFUNC(common,getTurretConfigPath);
if ((getNumber (_turretConfig >> "disableSoundAttenuation")) == 1) then {
_effectType = "";
} else {