mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
543e829278
When aiming down sights, view is considered to be "gunner" and so the overlay would be disabled. Introduces addition canUseWeapon check if view is "gunner" to differentiate FFV seats from regular gunner seats
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
/*
|
|
* 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
|
|
*/
|
|
#include "script_component.hpp"
|
|
if (!alive ace_player) exitWith {};
|
|
if (true) then {
|
|
// Detect if curator interface is open and disable effects
|
|
if !(isNull curatorCamera) exitWith {
|
|
if (GVAR(EffectsActive)) then {
|
|
call FUNC(removeGlassesEffect);
|
|
};
|
|
};
|
|
call FUNC(checkGlasses);
|
|
if !([ace_player] call FUNC(isGogglesVisible)) exitWith {
|
|
if (GVAR(EffectsActive)) then {
|
|
call FUNC(removeGlassesEffect);
|
|
};
|
|
};
|
|
if (call FUNC(externalCamera)) exitWith {
|
|
if (GVAR(EffectsActive)) then {
|
|
call FUNC(removeGlassesEffect);
|
|
};
|
|
};
|
|
if !(GVAR(EffectsActive)) then {
|
|
[goggles ace_player] call FUNC(applyGlassesEffect);
|
|
} else {
|
|
if ([goggles ace_player] call FUNC(isDivingGoggles) && {underwater ace_player}) then {
|
|
call FUNC(removeRainEffect);
|
|
call FUNC(removeDirtEffect);
|
|
call FUNC(removeDustEffect);
|
|
};
|
|
};
|
|
};
|