ACE3/addons/goggles/functions/fnc_handleKilled.sqf
PabstMirror ebbf2b373a goggles - prevent CBA PFEH warning
fix "x\cba\addons\common\fnc_removePerFrameHandler.sqf:30","WARNING:
Invalid or not existing PFH ID."
2015-11-17 23:44:50 -06:00

35 lines
593 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};
GVAR(PostProcessEyes) ppEffectEnable false;
SETGLASSES(_unit,GLASSESDEFAULT);
call FUNC(removeGlassesEffect);
GVAR(EffectsActive) = false;
_unit setVariable ["ACE_EyesDamaged", false];
if (GVAR(DustHandler) != -1) then {
[GVAR(DustHandler)] call CBA_fnc_removePerFrameHandler;
};
GVAR(DustHandler) = -1;
true