2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
* Author: KoffeinFlummi, commy2
|
|
|
|
*
|
|
|
|
* Handles deafness due to explosions going off near the player.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* -> Explosion Event Handler
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* none
|
|
|
|
*/
|
2015-01-14 01:41:53 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
private ["_unit", "_damage", "_strength"];
|
|
|
|
|
|
|
|
_unit = _this select 0;
|
|
|
|
_damage = _this select 1;
|
|
|
|
|
|
|
|
_strength = (_damage * 2) min 1;
|
|
|
|
if (_strength < 0.01) exitWith {};
|
|
|
|
|
|
|
|
[_unit, _strength] spawn {
|
|
|
|
sleep 0.2;
|
2015-01-13 04:17:52 +00:00
|
|
|
_this call FUNC(earRinging);
|
2015-01-11 16:42:31 +00:00
|
|
|
};
|