2015-01-18 21:50:45 +00:00
|
|
|
/*
|
2015-02-02 09:04:53 +00:00
|
|
|
* Author: Garth 'L-H' de Wet
|
|
|
|
* Adds dirt effect to the glasses.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Succeeded <BOOL>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* _applied = call ace_goggles_fnc_ApplyDirtEffect;
|
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
2015-01-18 21:50:45 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
if (cameraOn != ace_player || {call FUNC(externalCamera)}) exitWith{false};
|
2015-04-18 03:40:37 +00:00
|
|
|
private ["_dirtImage", "_applied", "_effects"];
|
2015-01-25 06:55:35 +00:00
|
|
|
_effects = GETGLASSES(ace_player);
|
2015-01-18 23:38:54 +00:00
|
|
|
_effects set [DIRT, true];
|
|
|
|
SETGLASSES(ace_player,_effects);
|
2015-01-18 21:50:45 +00:00
|
|
|
|
2015-02-02 09:04:53 +00:00
|
|
|
if ([ace_player] call FUNC(isGogglesVisible)) then{
|
2015-04-06 16:22:43 +00:00
|
|
|
_dirtImage = getText(ConfigFile >> "CfgGlasses" >> (goggles ace_player) >> "ACE_OverlayDirt");
|
|
|
|
if (_dirtImage != "") then {
|
|
|
|
100 cutRsc["RscACE_GogglesEffects", "PLAIN",0.1, false];
|
2015-01-18 21:50:45 +00:00
|
|
|
|
2015-04-06 16:22:43 +00:00
|
|
|
(GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10660) ctrlSetText _dirtImage;
|
|
|
|
};
|
2015-01-18 21:50:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
true
|