2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-06-13 15:16:18 +00:00
|
|
|
* Author: KoffeinFlummi, commy2, Rocko, Rommel, Ruthberg
|
2016-02-17 00:17:42 +00:00
|
|
|
* Handle new sound souce near ace_player and apply hearing damage
|
2015-01-11 16:42:31 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2016-02-17 00:17:42 +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:
|
2016-02-17 00:17:42 +00:00
|
|
|
* [_strength] call ace_hearing_fnc_earRinging
|
2015-03-15 21:40:47 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
2015-01-14 01:41:53 +00:00
|
|
|
#include "script_component.hpp"
|
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 {};
|
2015-08-08 19:40:19 +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));
|