Skip to content

Commit

Permalink
Nightvision - Register effects during preInit (#9788)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkIsGrim authored Feb 11, 2024
1 parent cdc5164 commit a47ae27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions addons/nightvision/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ PREP_RECOMPILE_END;

#include "initSettings.inc.sqf"

// #9781 - register effects layer ASAP
QGVAR(display) cutText ["", "PLAIN"];

ADDON = true;
5 changes: 2 additions & 3 deletions addons/nightvision/functions/fnc_setupDisplayEffects.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ if (GVAR(fogScaling) > 0) then {
};
};

// Note: Using BIS_fnc_rscLayer because of bug with string syntax - https://feedback.bistudio.com/T120768
(QGVAR(display) call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; // Cleanup Old Display
QGVAR(display) cutText ["", "PLAIN"]; // Cleanup Old Display
if (_activated) then { // Create New Display
(QGVAR(display) call BIS_fnc_rscLayer) cutRsc [QGVAR(title), "PLAIN", 0, false, false]; // draw under HUD
QGVAR(display) cutRsc [QGVAR(title), "PLAIN", 0, false, false]; // draw under HUD
};

// Cleanup Old PP Effects
Expand Down

0 comments on commit a47ae27

Please sign in to comment.