mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
e535988479
* Hearing cleanup * Update fnc_updateHearingProtection.sqf * Fixes + tweaks * Update initSettings.inc.sqf * Update fnc_removeEarplugs.sqf
27 lines
588 B
Plaintext
27 lines
588 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: KoffeinFlummi, commy2, Ruthberg
|
|
* Handles deafness due to explosions going off near the player.
|
|
*
|
|
* Arguments:
|
|
* 0: Unit <OBJECT>
|
|
* 1: Damage inflicted to the unit <NUMBER>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [clientExplosionEvent] call ace_hearing_fnc_explosionNear
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_unit", "_damage"];
|
|
|
|
TRACE_2("explosion near player",_unit,_damage);
|
|
|
|
private _strength = (0 max _damage) * 30;
|
|
|
|
// Call immediately, as it will get picked up later by the update thread anyway
|
|
_strength call FUNC(earRinging);
|