2015-01-18 21:50:45 +00:00
|
|
|
/*
|
2015-02-02 09:04:53 +00:00
|
|
|
* Author: Garth 'L-H' de Wet
|
|
|
|
* Performs rain checks and checks to see whether glasses effects have been applied or not.
|
|
|
|
* Checks for external camera and removes effects.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-18 21:50:45 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-18 22:57:39 +00:00
|
|
|
if (!alive ace_player) exitWith {};
|
|
|
|
if (true) then {
|
|
|
|
// Detect if curator interface is open and disable effects
|
|
|
|
if (!isNull(findDisplay 312)) exitWith {
|
|
|
|
if (GVAR(EffectsActive)) then {
|
|
|
|
call FUNC(removeGlassesEffect);
|
2015-01-18 21:50:45 +00:00
|
|
|
};
|
2015-01-18 22:57:39 +00:00
|
|
|
};
|
|
|
|
call FUNC(checkGlasses);
|
2015-02-02 09:04:53 +00:00
|
|
|
if !([ace_player] call FUNC(isGogglesVisible)) exitWith {
|
2015-01-18 22:57:39 +00:00
|
|
|
if (GVAR(EffectsActive)) then {
|
|
|
|
call FUNC(removeGlassesEffect);
|
2015-01-18 21:50:45 +00:00
|
|
|
};
|
2015-01-18 22:57:39 +00:00
|
|
|
};
|
|
|
|
if (call FUNC(externalCamera)) exitWith {
|
|
|
|
if (GVAR(EffectsActive)) then {
|
|
|
|
call FUNC(removeGlassesEffect);
|
2015-01-18 21:50:45 +00:00
|
|
|
};
|
2015-01-18 22:57:39 +00:00
|
|
|
};
|
|
|
|
if !(GVAR(EffectsActive)) then {
|
2015-02-02 09:04:53 +00:00
|
|
|
[goggles ace_player] call FUNC(applyGlassesEffect);
|
2015-01-18 22:57:39 +00:00
|
|
|
} else {
|
2015-02-02 09:04:53 +00:00
|
|
|
if ([goggles ace_player] call FUNC(isDivingGoggles) && {underwater ace_player}) then {
|
2015-01-18 22:57:39 +00:00
|
|
|
call FUNC(removeRainEffect);
|
|
|
|
call FUNC(removeDirtEffect);
|
|
|
|
call FUNC(removeDustEffect);
|
2015-01-18 21:50:45 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|