mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
reset effect on magnifaction transition
This commit is contained in:
parent
f9f1d634ae
commit
42f710cdd0
@ -21,6 +21,7 @@ GVAR(ppeffectRadialBlur) = -1;
|
|||||||
GVAR(ppeffectColorCorrect) = -1;
|
GVAR(ppeffectColorCorrect) = -1;
|
||||||
GVAR(ppeffectBlur) = -1;
|
GVAR(ppeffectBlur) = -1;
|
||||||
|
|
||||||
|
GVAR(isUsingMagnification) = false;
|
||||||
|
|
||||||
["ace_settingsInitialized", {
|
["ace_settingsInitialized", {
|
||||||
TRACE_4("settingsInitialized",GVAR(disableNVGsWithSights),GVAR(fogScaling),GVAR(noiseScaling),GVAR(effectScaling));
|
TRACE_4("settingsInitialized",GVAR(disableNVGsWithSights),GVAR(fogScaling),GVAR(noiseScaling),GVAR(effectScaling));
|
||||||
|
@ -20,7 +20,7 @@ params ["_unit", "_cameraView"];
|
|||||||
TRACE_2("onCameraViewChanged",_unit,_cameraView);
|
TRACE_2("onCameraViewChanged",_unit,_cameraView);
|
||||||
|
|
||||||
// Refresh goggle effect (e.g. switching to vehicle's NVG)
|
// Refresh goggle effect (e.g. switching to vehicle's NVG)
|
||||||
FUNC(refreshGoggleType) call CBA_fnc_execNextFrame;
|
call FUNC(refreshGoggleType);
|
||||||
|
|
||||||
if (GVAR(disableNVGsWithSights) && {(hmd _unit) != ""}) then {
|
if (GVAR(disableNVGsWithSights) && {(hmd _unit) != ""}) then {
|
||||||
if ((vehicle _unit == _unit)
|
if ((vehicle _unit == _unit)
|
||||||
|
@ -57,6 +57,11 @@ if (!(GVAR(defaultPositionBorder) isEqualTo [])) then {
|
|||||||
};
|
};
|
||||||
END_COUNTER(borderScaling);
|
END_COUNTER(borderScaling);
|
||||||
|
|
||||||
|
if !(IS_MAGNIFIED isEqualTo GVAR(isUsingMagnification)) then {
|
||||||
|
GVAR(isUsingMagnification) = IS_MAGNIFIED;
|
||||||
|
GVAR(nextEffectsUpdate) = -1;
|
||||||
|
};
|
||||||
|
|
||||||
if (CBA_missionTime < GVAR(nextEffectsUpdate)) then {
|
if (CBA_missionTime < GVAR(nextEffectsUpdate)) then {
|
||||||
// Update radial blur as it depends on zoom level, so should be changed each frame like the border/hex
|
// Update radial blur as it depends on zoom level, so should be changed each frame like the border/hex
|
||||||
if (GVAR(ppeffectRadialBlur) != -1) then {
|
if (GVAR(ppeffectRadialBlur) != -1) then {
|
||||||
@ -89,7 +94,7 @@ if (CBA_missionTime < GVAR(nextEffectsUpdate)) then {
|
|||||||
private _fogApply = linearConversion [0, 1, _effectiveLight, ST_NVG_MAXFOG, ST_NVG_MINFOG, true];
|
private _fogApply = linearConversion [0, 1, _effectiveLight, ST_NVG_MAXFOG, ST_NVG_MINFOG, true];
|
||||||
|
|
||||||
// Modify blur if looking down scope
|
// Modify blur if looking down scope
|
||||||
if (cameraView == "GUNNER" && {[_unit] call CBA_fnc_canUseWeapon && {0.75 call CBA_fnc_getFOV select 1 < 3.01}}) then {
|
if (cameraView == "GUNNER" && {[_unit] call CBA_fnc_canUseWeapon && {!GVAR(isUsingMagnification)}}) then {
|
||||||
private _weapon = currentWeapon _unit;
|
private _weapon = currentWeapon _unit;
|
||||||
if (_weapon == "") exitWith {};
|
if (_weapon == "") exitWith {};
|
||||||
if (_weapon == primaryWeapon _unit) exitWith {_blurFinal = _blurFinal * linearConversion [0, 1, GVAR(aimDownSightsBlur), 1, ST_NVG_CAMERA_BLUR_SIGHTS_RIFLE]}; // Rifles are bad
|
if (_weapon == primaryWeapon _unit) exitWith {_blurFinal = _blurFinal * linearConversion [0, 1, GVAR(aimDownSightsBlur), 1, ST_NVG_CAMERA_BLUR_SIGHTS_RIFLE]}; // Rifles are bad
|
||||||
|
@ -46,3 +46,5 @@
|
|||||||
|
|
||||||
#define ST_NVG_NOISESHARPNESS_MIN 1.2
|
#define ST_NVG_NOISESHARPNESS_MIN 1.2
|
||||||
#define ST_NVG_NOISESHARPNESS_MAX 1
|
#define ST_NVG_NOISESHARPNESS_MAX 1
|
||||||
|
|
||||||
|
#define IS_MAGNIFIED (0.75 call CBA_fnc_getFOV select 1 > 3.01)
|
||||||
|
Loading…
Reference in New Issue
Block a user