2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-09-29 20:24:25 +00:00
|
|
|
/*
|
|
|
|
* Author: Garth 'L-H' de Wet, commy2
|
|
|
|
* Handles the player dying.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Function is handled? <BOOL>
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [bob] call ace_goggles_fnc_handleKilled
|
|
|
|
*
|
2015-09-29 20:24:25 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
params ["_unit"];
|
|
|
|
|
|
|
|
if (_unit != ACE_player) exitWith {true};
|
2016-06-26 00:16:26 +00:00
|
|
|
if (GVAR(effects) == 0) exitWith {true};
|
2015-09-29 20:24:25 +00:00
|
|
|
|
|
|
|
call FUNC(removeGlassesEffect);
|
|
|
|
|
2020-07-22 15:24:43 +00:00
|
|
|
if (GVAR(effects) in [2, 3]) then {
|
2016-06-26 00:16:26 +00:00
|
|
|
GVAR(PostProcessEyes) ppEffectEnable false;
|
|
|
|
|
|
|
|
SETGLASSES(_unit,GLASSESDEFAULT);
|
2015-09-29 20:24:25 +00:00
|
|
|
|
2016-06-26 00:16:26 +00:00
|
|
|
_unit setVariable ["ACE_EyesDamaged", false];
|
2015-09-29 20:24:25 +00:00
|
|
|
|
2016-06-26 00:16:26 +00:00
|
|
|
if (GVAR(DustHandler) != -1) then {
|
|
|
|
[GVAR(DustHandler)] call CBA_fnc_removePerFrameHandler;
|
|
|
|
};
|
|
|
|
GVAR(DustHandler) = -1;
|
2015-11-18 05:44:50 +00:00
|
|
|
};
|
2015-09-29 20:24:25 +00:00
|
|
|
|
|
|
|
true
|