From 1ece2604e68d7aa0eb7a88c3ae69d1ce7a599378 Mon Sep 17 00:00:00 2001 From: LinkIsGrim <69561145+LinkIsGrim@users.noreply.github.com> Date: Sun, 13 Oct 2024 11:00:59 -0300 Subject: [PATCH 1/2] use sqrt of _maxDistance --- addons/hearing/functions/fnc_explosion.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/hearing/functions/fnc_explosion.sqf b/addons/hearing/functions/fnc_explosion.sqf index f0a1ee6aab1..8d095a67e07 100644 --- a/addons/hearing/functions/fnc_explosion.sqf +++ b/addons/hearing/functions/fnc_explosion.sqf @@ -48,7 +48,8 @@ if (_distance > _maxDistance) exitWith { TRACE_2("too far away",_distance,_maxDistance); }; -private _strength = _vehAttenuation * _explosive * _volume * _maxDistance / _distance^2; +// Tone down _maxDistance to bring strength back to similar levels as a large burst of a loud weapon +private _strength = _vehAttenuation * _explosive * _volume * (sqrt _maxDistance) / _distance^2; TRACE_2("strength",_volume,_strength); From 4f32f12c3594d01cb342aaa80d673cc459a16693 Mon Sep 17 00:00:00 2001 From: LinkIsGrim <69561145+LinkIsGrim@users.noreply.github.com> Date: Sun, 13 Oct 2024 17:09:08 -0300 Subject: [PATCH 2/2] divide maxDistance by 2 instead --- addons/hearing/functions/fnc_explosion.sqf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/hearing/functions/fnc_explosion.sqf b/addons/hearing/functions/fnc_explosion.sqf index a8db6a4ba35..2d3d5929895 100644 --- a/addons/hearing/functions/fnc_explosion.sqf +++ b/addons/hearing/functions/fnc_explosion.sqf @@ -49,8 +49,7 @@ if (_distance > _maxDistance) exitWith { }; // Tone down _maxDistance to bring strength back to similar levels as a large burst of a loud weapon -private _strength = _vehAttenuation * _explosive * _volume * (sqrt _maxDistance) / _distance^2; - +private _strength = _vehAttenuation * _explosive * _volume * (_maxDistance / 2) / _distance^2; TRACE_6("strength",_vehAttenuation,_explosive,_volume,_maxDistance,_distance,_strength); // Call immediately, as it will get picked up later by the update thread anyway