Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/nightvision/functions/fnc_onVisionModeChanged.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ if (GVAR(effectScaling) == 0) exitWith {

// Start PFEH when entering night vision mode:
if (_visionMode > 0) then {
[true] call FUNC(setupDisplayEffects); // always reset effects (switching from NVG to Thermal)
if (GVAR(PFID) == -1) then {
GVAR(running) = true;
[true] call FUNC(setupDisplayEffects);
[] call FUNC(refreshGoggleType);
GVAR(PFID) = [LINKFUNC(pfeh), 0, []] call CBA_fnc_addPerFrameHandler;
GVAR(firedEHs) = [
Expand Down
3 changes: 3 additions & 0 deletions addons/nightvision/functions/fnc_pfeh.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ if (GVAR(defaultPositionBorder) isNotEqualTo []) then {
};
END_COUNTER(borderScaling);

// Skip all other effects if just in thermal
if (currentVisionMode _unit > 1) exitWith {};

if (IS_MAGNIFIED isNotEqualTo GVAR(isUsingMagnification)) then {
GVAR(isUsingMagnification) = IS_MAGNIFIED;
GVAR(nextEffectsUpdate) = -1;
Expand Down
1 change: 1 addition & 0 deletions addons/nightvision/functions/fnc_setupDisplayEffects.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ if (GVAR(fogScaling) > 0) then {
0 setFog GVAR(priorFog);
GVAR(priorFog) = nil;
} else {
if (currentVisionMode _unit > 1) exitWith {}; // Don't error if switching directly to thermal
ERROR("no fog backed up");
};

Expand Down