ACE3/addons/hearing/functions/fnc_earRinging.sqf

26 lines
647 B
Plaintext
Raw Normal View History

/*
2015-06-13 15:16:18 +00:00
* 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:
2015-03-15 21:40:47 +00:00
* None
*
* Example:
* [_strength] call ace_hearing_fnc_earRinging
2015-03-15 21:40:47 +00:00
*
* Public: No
*/
2015-01-14 01:41:53 +00:00
#include "script_component.hpp"
2016-02-16 18:58:42 +00:00
params ["_strength"];
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 {};
TRACE_2("adding",_strength * GVAR(damageCoefficent),GVAR(deafnessDV));
GVAR(deafnessDV) = GVAR(deafnessDV) + (_strength * GVAR(damageCoefficent));