mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Nightvision - Add setting for blur when ADS (#5924)
* Nightvision - Add setting for blur when ADS * Allow blocking brightness control
This commit is contained in:
parent
0a31a24fdf
commit
c8b9483b44
@ -22,4 +22,11 @@ class ACE_Settings {
|
||||
value = 1;
|
||||
sliderSettings[] = {0, 2, 1, 1};
|
||||
};
|
||||
class GVAR(aimDownSightsBlur) {
|
||||
category = CSTRING(Category);
|
||||
displayName = CSTRING(aimDownSightsBlur_DisplayName);
|
||||
typeName = "SCALAR";
|
||||
value = 1;
|
||||
sliderSettings[] = {0, 2, 1, 1};
|
||||
};
|
||||
};
|
||||
|
@ -66,6 +66,7 @@ if (!isNil QGVAR(serverPriorFog)) then {[] call FUNC(nonDedicatedFix);}; // If v
|
||||
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting", "isNotRefueling"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if ((currentVisionMode ACE_player != 1)) exitWith {false};
|
||||
if (!(missionNamespace getVariable [QGVAR(allowBrightnessControl), true])) exitWith {false}; // just a mission setVar (not ace_setting)
|
||||
|
||||
// Statement
|
||||
[ACE_player, 1] call FUNC(changeNVGBrightness);
|
||||
@ -77,6 +78,7 @@ if (!isNil QGVAR(serverPriorFog)) then {[] call FUNC(nonDedicatedFix);}; // If v
|
||||
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting", "isNotRefueling"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if ((currentVisionMode ACE_player != 1)) exitWith {false};
|
||||
if (!(missionNamespace getVariable [QGVAR(allowBrightnessControl), true])) exitWith {false}; // just a mission setVar (not ace_setting)
|
||||
|
||||
// Statement
|
||||
[ACE_player, -1] call FUNC(changeNVGBrightness);
|
||||
|
@ -88,8 +88,8 @@ if (CBA_missionTime < GVAR(nextEffectsUpdate)) then {
|
||||
// Modify blur if looking down scope
|
||||
if ((cameraView == "GUNNER") && {[ACE_player] call CBA_fnc_canUseWeapon}) then {
|
||||
if (currentWeapon ACE_player == "") exitWith {};
|
||||
if (currentWeapon ACE_player == primaryWeapon ACE_player) exitWith {_blurFinal = _blurFinal * ST_NVG_CAMERA_BLUR_SIGHTS_RIFLE}; // Rifles are bad
|
||||
if (currentWeapon ACE_player == handgunWeapon ACE_player) exitWith {_blurFinal = _blurFinal * ST_NVG_CAMERA_BLUR_SIGHTS_PISTOL}; // Pistols aren't so bad
|
||||
if (currentWeapon ACE_player == primaryWeapon ACE_player) exitWith {_blurFinal = _blurFinal * linearConversion [0, 1, GVAR(aimDownSightsBlur), 1, ST_NVG_CAMERA_BLUR_SIGHTS_RIFLE]}; // Rifles are bad
|
||||
if (currentWeapon ACE_player == handgunWeapon ACE_player) exitWith {_blurFinal = _blurFinal * linearConversion [0, 1, GVAR(aimDownSightsBlur), 1, ST_NVG_CAMERA_BLUR_SIGHTS_PISTOL]}; // Pistols aren't so bad
|
||||
};
|
||||
|
||||
// Scale effects based on ace_nightvision_effectScaling setting
|
||||
@ -98,7 +98,6 @@ if (CBA_missionTime < GVAR(nextEffectsUpdate)) then {
|
||||
private _radialBlurPower = 0.0025 * GVAR(effectScaling);
|
||||
_brightFinal = linearConversion [0, 1, GVAR(effectScaling), 1, _brightFinal];
|
||||
_contrastFinal = linearConversion [0, 1, GVAR(effectScaling), 1, _contrastFinal];
|
||||
_blurFinal = _blurFinal * GVAR(effectScaling);
|
||||
|
||||
|
||||
// Setup all effects
|
||||
|
@ -262,5 +262,8 @@
|
||||
<Japanese>ぼかしと粒子、明度効果 [0 に設定で全効果を無効化します]</Japanese>
|
||||
<Italian>Effetti di sfocatura, sgranatura e luminosità [Importare a 0 disabiliterà TUTTI gli effetti della visione notturna]</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_NightVision_aimDownSightsBlur_DisplayName">
|
||||
<English>Aim Down Sights Blur</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user