ACE3/addons/goggles/functions/fnc_handleKilled.sqf
PabstMirror 5108ffe20c Add goggles setting for level of effects
Can chose between none, tint/colorCC/ and full dust/dirt/rain/rotorwash
2016-06-25 19:16:26 -05:00

36 lines
666 B
Plaintext

/*
* Author: Garth 'L-H' de Wet, commy2
* Handles the player dying.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* Function is handled? <BOOL>
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
if (_unit != ACE_player) exitWith {true};
if (GVAR(effects) == 0) exitWith {true};
call FUNC(removeGlassesEffect);
if (GVAR(effects) == 2) then {
GVAR(PostProcessEyes) ppEffectEnable false;
SETGLASSES(_unit,GLASSESDEFAULT);
_unit setVariable ["ACE_EyesDamaged", false];
if (GVAR(DustHandler) != -1) then {
[GVAR(DustHandler)] call CBA_fnc_removePerFrameHandler;
};
GVAR(DustHandler) = -1;
};
true