#1988 - Boost explosive hearing damage

This commit is contained in:
PabstMirror 2015-08-30 01:47:40 -05:00
parent 8307ccea96
commit 910bb151e2
3 changed files with 8 additions and 5 deletions

View File

@ -29,7 +29,7 @@ class Extended_FiredNear_EventHandlers {
class Extended_Explosion_EventHandlers {
class CAManBase {
class GVAR(ExplosionNear) {
clientExplosion = QUOTE( if (GVAR(enableCombatDeafness) && {_this select 0 == ACE_player}) then {_this call FUNC(explosionNear)}; );
clientExplosion = QUOTE(_this call FUNC(explosionNear););
};
};
};

View File

@ -21,8 +21,12 @@ if ((!GVAR(enableCombatDeafness)) && GVAR(DisableEarRinging)) exitWith {};
params ["_unit", "_damage"];
if (_unit != ACE_player) exitWith {};
TRACE_2("explosion near player",_unit,_damage);
private ["_strength"];
_strength = 0 max _damage;
_strength = (0 max _damage) * 30;
if (_strength < 0.01) exitWith {};
[{_this call FUNC(earRinging)}, [_unit, _strength], 0.2, 0] call EFUNC(common,waitAndExecute);
[{_this call FUNC(earRinging)}, [_unit, _strength], 0.2] call EFUNC(common,waitAndExecute);

View File

@ -9,9 +9,8 @@
* None
*/
#include "script_component.hpp"
params ["_logic", "_units", "_activated"];
if !(_activated) exitWith {};
params ["_logic"];
[_logic, QGVAR(enableCombatDeafness), "EnableCombatDeafness"] call EFUNC(common,readSettingFromModule);