mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Working NVG
This commit is contained in:
parent
96110c25e7
commit
72cd691e46
@ -47,7 +47,7 @@ class CfgWeapons {
|
||||
};
|
||||
class ACE_NVG_Wide: NVGoggles {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
modelOptics = PATHOF(ACE_nvg_wide_optics.p3d);
|
||||
modelOptics = QUOTE(PATHTOF(ACE_nvg_wide_optics));
|
||||
displayName = "$STR_ACE_NightVision_NVG_FullScreen";
|
||||
ACE_NightVision_grain = 0.75;
|
||||
ACE_NightVision_blur = 0.055;
|
||||
|
@ -14,6 +14,7 @@ class CfgPatches {
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
|
||||
class ACE_Core_Default_Keys {
|
||||
class increaseNVGBrightness {
|
||||
|
@ -62,7 +62,7 @@ _darkness = 1 - (call EFUNC(common,ambientBrightness));
|
||||
_visibleFire = _darkness * _visibleFireCoef * _visibleFire * _nvgBrightnessCoef / 10 min 1;
|
||||
_visibleFireTime = _darkness * _visibleFireTimeCoef * _visibleFireTime * _nvgBrightnessCoef / 10 min 0.5;
|
||||
|
||||
["NightVision", [_visibleFire, _visibleFireTime], {format ["visibleFire: %1 - visibleFireTime: %2", _this select 0, _this select 1]}] call AGM_Debug_fnc_log;
|
||||
// ["NightVision", [_visibleFire, _visibleFireTime], {format ["visibleFire: %1 - visibleFireTime: %2", _this select 0, _this select 1]}] call AGM_Debug_fnc_log; //todo
|
||||
|
||||
GVAR(ppEffectMuzzleFlash) ppEffectAdjust [1, 1, _visibleFire, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]];
|
||||
GVAR(ppEffectMuzzleFlash) ppEffectCommit 0;
|
||||
|
@ -1,7 +1,6 @@
|
||||
//by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
xxx =5;
|
||||
|
||||
private ["_currentVehicle", "_currentTurret", "_currentHMD", "_grainSetting", "_blurSetting"];
|
||||
|
||||
@ -57,9 +56,9 @@ while {true} do {
|
||||
|
||||
// on foot or in vehicle using hmd
|
||||
if ((_currentVehicle == ACE_player) || _fnc_isUsingHMD) then {
|
||||
_grainSetting = getNumber (configFile >> "CfgWeapons" >> _currentHMD >> "AGM_NightVision_grain");
|
||||
_blurSetting = getNumber (configFile >> "CfgWeapons" >> _currentHMD >> "AGM_NightVision_blur");
|
||||
_radBlurSetting = getNumber (configFile >> "CfgWeapons" >> _currentHMD >> "AGM_NightVision_radBlur");
|
||||
_grainSetting = getNumber (configFile >> "CfgWeapons" >> _currentHMD >> "ACE_NightVision_grain");
|
||||
_blurSetting = getNumber (configFile >> "CfgWeapons" >> _currentHMD >> "ACE_NightVision_blur");
|
||||
_radBlurSetting = getNumber (configFile >> "CfgWeapons" >> _currentHMD >> "ACE_NightVision_radBlur");
|
||||
|
||||
GVAR(ppEffectFilmGrain) ppEffectAdjust [0.25, 2.5, 2.5, _grainSetting, _grainSetting, false];
|
||||
GVAR(ppEffectFilmGrain) ppEffectCommit 0;
|
||||
@ -70,9 +69,10 @@ while {true} do {
|
||||
|
||||
// in vehicle and not using hmd
|
||||
} else {
|
||||
_grainSetting = _currentVehicle getVariable ["AGM_NightVision_grain", getNumber (_config >> "AGM_NightVision_grain")];
|
||||
_blurSetting = _currentVehicle getVariable ["AGM_NightVision_blur", getNumber (_config >> "AGM_NightVision_blur")];
|
||||
_radBlurSetting = _currentVehicle getVariable ["AGM_NightVision_radBlur", getNumber (_config >> "AGM_NightVision_radBlur")];
|
||||
|
||||
_grainSetting = _currentVehicle getVariable ["ACE_NightVision_grain", getNumber (_config >> "ACE_NightVision_grain")];
|
||||
_blurSetting = _currentVehicle getVariable ["ACE_NightVision_blur", getNumber (_config >> "ACE_NightVision_blur")];
|
||||
_radBlurSetting = _currentVehicle getVariable ["ACE_NightVision_radBlur", getNumber (_config >> "ACE_NightVision_radBlur")];
|
||||
|
||||
GVAR(ppEffectFilmGrain) ppEffectAdjust [0.25, 2.5, 2.5, _grainSetting, _grainSetting, false];
|
||||
GVAR(ppEffectFilmGrain) ppEffectCommit 0;
|
||||
|
Loading…
Reference in New Issue
Block a user