From d457d9ffeac7dd1a8fc4a2c95013ef69e65b8c9b Mon Sep 17 00:00:00 2001
From: PabstMirror <elephantisaterriblemascot@gmail.com>
Date: Fri, 29 May 2015 15:37:53 -0500
Subject: [PATCH] NightVision adjustment - use CSE's gamma

---
 addons/nightvision/functions/fnc_changeNVGBrightness.sqf | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/addons/nightvision/functions/fnc_changeNVGBrightness.sqf b/addons/nightvision/functions/fnc_changeNVGBrightness.sqf
index e1894aba00..29c6b976cf 100644
--- a/addons/nightvision/functions/fnc_changeNVGBrightness.sqf
+++ b/addons/nightvision/functions/fnc_changeNVGBrightness.sqf
@@ -22,12 +22,12 @@ PARAMS_2(_player,_changeInBrightness);
 
 _brightness = _player getVariable [QGVAR(NVGBrightness), 0];
 
-_brightness = ((round (10 * _brightness + _changeInBrightness) / 10) min 1) max -1;
+_brightness = ((round (10 * _brightness + _changeInBrightness) / 10) min 0.5) max -0.5;
 
 _player setVariable [QGVAR(NVGBrightness), _brightness, false];
 
-GVAR(ppEffectNVGBrightness) ppEffectAdjust [1, 1, _brightness / 4, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]];
+GVAR(ppEffectNVGBrightness) ppEffectAdjust [1, (_brightness + 1), 0, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]];
 GVAR(ppEffectNVGBrightness) ppEffectCommit 0;
 
-[format [(localize "STR_ACE_NightVision_NVGBrightness"), (_brightness * 100)]] call EFUNC(common,displayTextStructured);
+[format [(localize "STR_ACE_NightVision_NVGBrightness"), (_brightness * 10)]] call EFUNC(common,displayTextStructured);
 playSound "ACE_Sound_Click";