NightVision adjustment - use CSE's gamma

This commit is contained in:
PabstMirror 2015-05-29 15:37:53 -05:00
parent 8fbd7e8575
commit d457d9ffea

View File

@ -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";