mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Remove Debug
This commit is contained in:
parent
0edcf03e12
commit
ae064359f6
@ -1,12 +1,14 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
GVAR(currentDeafness) = 0;
|
GVAR(currentDeafness) = 0;
|
||||||
GVAR(newStrength) = 0;
|
GVAR(newStrength) = 0;
|
||||||
|
GVAR(playerVehAttunation) = 1;
|
||||||
|
|
||||||
// Spawn volume updating process
|
// Spawn volume updating process
|
||||||
[FUNC(updateVolume), 0.1, [] ] call CBA_fnc_addPerFrameHandler;
|
[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);
|
["playerVehicleChanged", {_this call FUNC(updatePlayerVehicleAttunation);}] call EFUNC(common,addEventHandler);
|
||||||
["playerTurretChanged", {_this call FUNC(updatePlayerVehicleAttunation);}] call EFUNC(common,addEventHandler);
|
["playerTurretChanged", {_this call FUNC(updatePlayerVehicleAttunation);}] call EFUNC(common,addEventHandler);
|
||||||
|
@ -21,17 +21,17 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_silencer", "_audibleFireCoef", "_loudness", "_strength"];
|
private ["_silencer", "_audibleFireCoef", "_loudness", "_strength", "_vehAttenuation"];
|
||||||
|
|
||||||
PARAMS_7(_object,_firer,_distance,_weapon,_muzzle,_mode,_ammo);
|
PARAMS_7(_object,_firer,_distance,_weapon,_muzzle,_mode,_ammo);
|
||||||
|
|
||||||
//Only run if combatDeafness enabled:
|
//Only run if combatDeafness enabled:
|
||||||
if (!GVAR(enableCombatDeafness)) exitWith {};
|
if (!GVAR(enableCombatDeafness)) exitWith {};
|
||||||
//Only run if firedNear object is player or player's vehicle:
|
//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 {};
|
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;};
|
if (_distance < 1) then {_distance = 1;};
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ _audibleFire = getNumber (configFile >> "CfgAmmo" >> _ammo >> "audibleFire");
|
|||||||
//_audibleFireTime = getNumber (configFile >> "CfgAmmo" >> _ammo >> "audibleFireTime");
|
//_audibleFireTime = getNumber (configFile >> "CfgAmmo" >> _ammo >> "audibleFireTime");
|
||||||
|
|
||||||
_loudness = _audibleFireCoef * _audibleFire / 64;
|
_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 {};
|
if (_strength < 0.01) exitWith {};
|
||||||
|
|
||||||
|
@ -25,12 +25,11 @@ if (ACE_player == _vehicle) then {
|
|||||||
} else {
|
} else {
|
||||||
_effectType = "";
|
_effectType = "";
|
||||||
_turretPath = [ACE_player] call EFUNC(common,getTurretIndex);
|
_turretPath = [ACE_player] call EFUNC(common,getTurretIndex);
|
||||||
systemChat format ["_turretPath %1", _turretPath];
|
|
||||||
_effectType = getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "attenuationEffectType");
|
_effectType = getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "attenuationEffectType");
|
||||||
systemChat format ["Veh EffectType %1", _effectType];
|
|
||||||
if (!(_turretPath isEqualTo [])) then {
|
if (!(_turretPath isEqualTo [])) then {
|
||||||
_turretConfig = [(configFile >> "CfgVehicles" >> (typeOf _vehicle)), _turretPath] call EFUNC(common,getTurretConfigPath);
|
_turretConfig = [(configFile >> "CfgVehicles" >> (typeOf _vehicle)), _turretPath] call EFUNC(common,getTurretConfigPath);
|
||||||
|
|
||||||
if ((getNumber (_turretConfig >> "disableSoundAttenuation")) == 1) then {
|
if ((getNumber (_turretConfig >> "disableSoundAttenuation")) == 1) then {
|
||||||
_effectType = "";
|
_effectType = "";
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user