NVG - Fix grain and color effects (#6018)

This commit is contained in:
PabstMirror 2018-01-05 18:23:56 -06:00 committed by GitHub
parent a881e5e2d3
commit 4eb7868f1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 14 deletions

View File

@ -13,3 +13,10 @@ class Extended_PostInit_EventHandlers {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
// In SP-Editor, opening escape menu will break nvg grain effect
class Extended_DisplayLoad_EventHandlers {
class RscDisplayInterrupt {
GVAR(resetGrain) = QUOTE(if (GVAR(ppeffectGrain) > -1) then {ppEffectDestroy GVAR(ppeffectGrain);};);
};
};

View File

@ -20,7 +20,6 @@ GVAR(ppeffectGrain) = -1;
GVAR(ppeffectRadialBlur) = -1;
GVAR(ppeffectColorCorrect) = -1;
GVAR(ppeffectBlur) = -1;
GVAR(ppEffectCCMuzzleFlash) = -1;
["ace_settingsInitialized", {

View File

@ -55,12 +55,7 @@ TRACE_1("final", _visibleFire);
if (_visibleFire <= 1.5) exitWith {};
if ((random (linearConversion [1, 4, GVAR(nvgGeneration), 10, 20])) > _visibleFire) exitWith {};
GVAR(ppEffectCCMuzzleFlash) = ppEffectCreate ["ColorCorrections", 1237];
GVAR(ppEffectCCMuzzleFlash) ppEffectEnable true;
GVAR(ppEffectCCMuzzleFlash) ppEffectForceInNVG true;
GVAR(ppEffectCCMuzzleFlash) ppEffectAdjust [1, 1, -1, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]];
GVAR(ppEffectCCMuzzleFlash) ppEffectCommit 0;
GVAR(ppEffectCCMuzzleFlash) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]];
GVAR(ppEffectCCMuzzleFlash) ppEffectCommit 0.07;
QGVAR(cutoff) cutText ["", "BLACK", .1];
[{
QGVAR(cutoff) cutText ["", "PLAIN", 0];
}, [], 0.07] call CBA_fnc_waitAndExecute;

View File

@ -71,7 +71,3 @@ if (GVAR(ppeffectColorCorrect) != -1) then {
ppEffectDestroy GVAR(ppeffectColorCorrect);
GVAR(ppeffectColorCorrect) = -1;
};
if (GVAR(ppEffectCCMuzzleFlash) != -1) then {
ppEffectDestroy GVAR(ppEffectCCMuzzleFlash);
GVAR(ppEffectCCMuzzleFlash) = -1;
};