2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-06-13 15:16:18 +00:00
|
|
|
* Author: KoffeinFlummi, commy2, Rocko, Rommel, Ruthberg
|
2024-05-29 17:01:39 +00:00
|
|
|
* Handle new sound souce near ace_player and apply hearing damage.
|
2015-01-11 16:42:31 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2024-05-29 17:01:39 +00:00
|
|
|
* 0: Strength of ear ringing <NUMBER>
|
2015-01-11 16:42:31 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2015-03-15 21:40:47 +00:00
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2024-05-29 17:01:39 +00:00
|
|
|
* 10 call ace_hearing_fnc_earRinging
|
2015-03-15 21:40:47 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
2024-05-29 17:01:39 +00:00
|
|
|
|
2016-02-16 18:58:42 +00:00
|
|
|
params ["_strength"];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-06-13 15:16:18 +00:00
|
|
|
if (_strength < 0.05) exitWith {};
|
2015-07-13 19:01:41 +00:00
|
|
|
if (!isNull curatorCamera) exitWith {};
|
2024-05-29 17:01:39 +00:00
|
|
|
if (!GVAR(enabledForZeusUnits) && {player != ACE_player}) exitWith {};
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2016-02-17 00:17:42 +00:00
|
|
|
TRACE_2("adding",_strength * GVAR(damageCoefficent),GVAR(deafnessDV));
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2016-02-17 00:17:42 +00:00
|
|
|
GVAR(deafnessDV) = GVAR(deafnessDV) + (_strength * GVAR(damageCoefficent));
|