mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
742626ff1a
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
28 lines
688 B
Plaintext
28 lines
688 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: KoffeinFlummi, commy2, Ruthberg
|
|
* Handles deafness due to explosions going off near the player.
|
|
*
|
|
* Arguments:
|
|
* 0: vehicle - Object the event handler is assigned to (player) <OBJECT>
|
|
* 1: damage - Damage inflicted to the object <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;
|
|
if (_strength < 0.01) exitWith {};
|
|
|
|
// Call inmediately, as it will get pick up later anyway by the update thread
|
|
[_strength] call FUNC(earRinging);
|