Make dirt/dust effects less bright at night

Fix #1447
This commit is contained in:
PabstMirror 2016-06-25 19:02:07 -05:00
parent 3aebbdd269
commit 5a92aaeb28
2 changed files with 8 additions and 0 deletions

View File

@ -32,6 +32,10 @@ if ([_unit] call FUNC(isGogglesVisible)) then {
if (_dirtImage != "") then {
GVAR(GogglesEffectsLayer) cutRsc ["RscACE_GogglesEffects", "PLAIN", 0.1, false];
(GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10660) ctrlSetText _dirtImage;
private _effectBrightness = linearConversion [0,1,([] call EFUNC(common,ambientBrightness)),0.25,1];
(GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10660) ctrlSetTextColor [_effectBrightness, _effectBrightness, _effectBrightness, 1];
TRACE_1("dirt",_effectBrightness);
};
};

View File

@ -26,6 +26,10 @@ if ([_unit] call FUNC(isGogglesVisible)) exitWith {
((GETUVAR(GVAR(DisplayEffects),displayNull)) displayCtrl 10662) ctrlSetText format [getText (configFile >> "CfgGlasses" >> goggles _unit >> "ACE_DustPath"), GETDUSTT(DAMOUNT) + 1];
private _effectBrightness = linearConversion [0,1,([] call EFUNC(common,ambientBrightness)),0.25,1];
((GETUVAR(GVAR(DisplayEffects),displayNull)) displayCtrl 10662) ctrlSetTextColor [_effectBrightness, _effectBrightness, _effectBrightness, 1];
TRACE_1("dust",_effectBrightness);
SETDUST(DAMOUNT,CLAMP(GETDUSTT(DAMOUNT) + 1,0,1));
SETDUST(DBULLETS,0);
};