mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
26 lines
647 B
Plaintext
26 lines
647 B
Plaintext
/*
|
|
* Author: KoffeinFlummi, commy2, Rocko, Rommel, Ruthberg
|
|
* Handle new sound souce near ace_player and apply hearing damage
|
|
*
|
|
* Arguments:
|
|
* 0: strength of ear ringing <NUMBER>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [_strength] call ace_hearing_fnc_earRinging
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
params ["_strength"];
|
|
|
|
if (_strength < 0.05) exitWith {};
|
|
if (!isNull curatorCamera) exitWith {};
|
|
if ((!GVAR(enabledForZeusUnits)) && {player != ACE_player}) exitWith {};
|
|
|
|
TRACE_2("adding",_strength * GVAR(damageCoefficent),GVAR(deafnessDV));
|
|
|
|
GVAR(deafnessDV) = GVAR(deafnessDV) + (_strength * GVAR(damageCoefficent));
|