Nightvision - Improve NVG Brightness adjustment limits (#10136)

* Update fnc_changeNVGBrightness.sqf

* Update XEH_postInit.sqf

* Update addons/nightvision/XEH_postInit.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Update XEH_postInit.sqf

* Update fnc_changeNVGBrightness.sqf

* Update nightvision-framework.md

* load order independence

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

---------

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
This commit is contained in:
Will/KJW 2024-08-02 13:52:44 +01:00 committed by GitHub
parent 6a25e9365a
commit 90d855c2c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 1 deletions

View File

@ -21,6 +21,9 @@ GVAR(ppeffectRadialBlur) = -1;
GVAR(ppeffectColorCorrect) = -1;
GVAR(ppeffectBlur) = -1;
if (isNil QGVAR(const_MaxBrightness)) then { GVAR(const_MaxBrightness) = 0; };
if (isNil QGVAR(const_MinBrightness)) then { GVAR(const_MinBrightness) = -6; };
GVAR(isUsingMagnification) = false;
["CBA_settingsInitialized", {

View File

@ -23,7 +23,7 @@ private _effectsEnabled = GVAR(effectScaling) != 0;
private _defaultBrightness = [-3, 0] select _effectsEnabled;
private _brightness = _player getVariable [QGVAR(NVGBrightness), _defaultBrightness];
_brightness = ((_brightness + _changeInBrightness) min 0) max -6;
_brightness = ((_brightness + _changeInBrightness) min GVAR(const_MaxBrightness)) max GVAR(const_MinBrightness);
_player setVariable [QGVAR(NVGBrightness), _brightness, false];
// Display default setting as 0

View File

@ -43,3 +43,10 @@ Additional color presets
```cpp
ace_nightvision_colorPreset[] = {0.0, {0.0, 0.0, 0.0, 0.0}, {1.1, 0.8, 1.9, 0.9}, {1, 1, 6, 0.0}}; // White Phosphor Preset
```
## 3. Brightness Limits
```cpp
ace_nightvision_const_maxBrightness = 0; // Defaults, change at your leisure
ace_nightvision_const_minBrightness = -6;
```