Merge pull request #2327 from acemod/fixGunnerGoggles

Fix gunner goggles
This commit is contained in:
SilentSpike 2015-09-02 13:31:50 +01:00
commit 6aa191b788
2 changed files with 3 additions and 6 deletions

View File

@ -18,7 +18,7 @@
if (!alive ace_player) exitWith {};
if (true) then {
// Detect if curator interface is open and disable effects
if (!isNull(findDisplay 312)) exitWith {
if !(isNull curatorCamera) exitWith {
if (GVAR(EffectsActive)) then {
call FUNC(removeGlassesEffect);
};

View File

@ -15,17 +15,14 @@
*/
#include "script_component.hpp"
PARAMS_1(_unit);
params ["_unit"];
private ["_currentGlasses", "_result", "_position", "_visible"];
_currentGlasses = goggles _unit;
_result = false;
if ((vehicle _unit) != _unit) exitWith {(cameraView != "GUNNER")};
if (_currentGlasses != "") then {
_position =(getPosASLW _unit);
_position = getPosASLW _unit;
if (surfaceIsWater _position && {((_position select 2) < 0.25)}) exitWith {
_result = ([_currentGlasses] call FUNC(isDivingGoggles));
};