mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
#1988 - Boost explosive hearing damage
This commit is contained in:
parent
8307ccea96
commit
910bb151e2
@ -29,7 +29,7 @@ class Extended_FiredNear_EventHandlers {
|
|||||||
class Extended_Explosion_EventHandlers {
|
class Extended_Explosion_EventHandlers {
|
||||||
class CAManBase {
|
class CAManBase {
|
||||||
class GVAR(ExplosionNear) {
|
class GVAR(ExplosionNear) {
|
||||||
clientExplosion = QUOTE( if (GVAR(enableCombatDeafness) && {_this select 0 == ACE_player}) then {_this call FUNC(explosionNear)}; );
|
clientExplosion = QUOTE(_this call FUNC(explosionNear););
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -21,8 +21,12 @@ if ((!GVAR(enableCombatDeafness)) && GVAR(DisableEarRinging)) exitWith {};
|
|||||||
|
|
||||||
params ["_unit", "_damage"];
|
params ["_unit", "_damage"];
|
||||||
|
|
||||||
|
if (_unit != ACE_player) exitWith {};
|
||||||
|
|
||||||
|
TRACE_2("explosion near player",_unit,_damage);
|
||||||
|
|
||||||
private ["_strength"];
|
private ["_strength"];
|
||||||
_strength = 0 max _damage;
|
_strength = (0 max _damage) * 30;
|
||||||
if (_strength < 0.01) exitWith {};
|
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);
|
||||||
|
@ -9,9 +9,8 @@
|
|||||||
* None
|
* None
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
params ["_logic", "_units", "_activated"];
|
|
||||||
|
|
||||||
if !(_activated) exitWith {};
|
params ["_logic"];
|
||||||
|
|
||||||
[_logic, QGVAR(enableCombatDeafness), "EnableCombatDeafness"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(enableCombatDeafness), "EnableCombatDeafness"] call EFUNC(common,readSettingFromModule);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user