Fix goggles overlay for FFV seats

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
This commit is contained in:
SilentSpike 2015-08-31 14:56:51 +01:00
parent 5e57cad669
commit 543e829278
2 changed files with 6 additions and 4 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,14 +15,16 @@
*/
#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 ((vehicle _unit) != _unit) exitWith {
(cameraView != "GUNNER") ||
{[_unit] call EFUNC(common,canUseWeapon)}
};
if (_currentGlasses != "") then {
_position =(getPosASLW _unit);