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, Ruthberg
|
2015-01-11 16:42:31 +00:00
|
|
|
* Handles deafness due to explosions going off near the player.
|
|
|
|
*
|
|
|
|
* Arguments:
|
2024-05-29 17:01:39 +00:00
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
* 1: Damage inflicted to the unit <NUMBER>
|
2015-01-11 16:42:31 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2015-03-15 21:40:47 +00:00
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [clientExplosionEvent] call ace_hearing_fnc_explosionNear
|
|
|
|
*
|
|
|
|
* Public: No
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
|
|
|
|
2015-08-13 21:42:20 +00:00
|
|
|
params ["_unit", "_damage"];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-08-30 06:47:40 +00:00
|
|
|
TRACE_2("explosion near player",_unit,_damage);
|
|
|
|
|
2017-10-10 14:39:59 +00:00
|
|
|
private _strength = (0 max _damage) * 30;
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2024-05-29 17:01:39 +00:00
|
|
|
// Call immediately, as it will get picked up later by the update thread anyway
|
|
|
|
_strength call FUNC(earRinging);
|