From 6a204aa7b9d1da950db6eee62d14b2962f88f834 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 12 Jan 2015 23:29:40 -0600 Subject: [PATCH] Remove Old toMerge --- .../agm/NightVision/agm_nvg_wide_optics.p3d | Bin 1403 -> 0 bytes TO_MERGE/agm/NightVision/clientInit.sqf | 30 ---- TO_MERGE/agm/NightVision/config.cpp | 142 ------------------ .../agm/NightVision/functions/fn_blending.sqf | 67 --------- .../functions/fn_decreaseNVGBrightness.sqf | 20 --- .../functions/fn_increaseNVGBrightness.sqf | 20 --- TO_MERGE/agm/NightVision/nightVision.sqf | 100 ------------ TO_MERGE/agm/NightVision/stringtable.xml | 127 ---------------- addons/nightvision/CfgEventHandlers.hpp | 2 +- addons/nightvision/config.cpp | 4 +- 10 files changed, 4 insertions(+), 508 deletions(-) delete mode 100644 TO_MERGE/agm/NightVision/agm_nvg_wide_optics.p3d delete mode 100644 TO_MERGE/agm/NightVision/clientInit.sqf delete mode 100644 TO_MERGE/agm/NightVision/config.cpp delete mode 100644 TO_MERGE/agm/NightVision/functions/fn_blending.sqf delete mode 100644 TO_MERGE/agm/NightVision/functions/fn_decreaseNVGBrightness.sqf delete mode 100644 TO_MERGE/agm/NightVision/functions/fn_increaseNVGBrightness.sqf delete mode 100644 TO_MERGE/agm/NightVision/nightVision.sqf delete mode 100644 TO_MERGE/agm/NightVision/stringtable.xml diff --git a/TO_MERGE/agm/NightVision/agm_nvg_wide_optics.p3d b/TO_MERGE/agm/NightVision/agm_nvg_wide_optics.p3d deleted file mode 100644 index 481ae8d234d13535d3cf4ee061480772c4afff11..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1403 zcmebE@poZlWMBXyh5%z1Ul||`;_v_|0U%}r@qwVPcGq5;NIozvkgfHK>XSoN_Z!m55 zUSxg|Q2zFs>u`B(pgb}k2BP9KC|XL> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "visibleFire"); - _visibleFireTimeCoef = getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "visibleFireTime"); -}; - -_visibleFire = getNumber (configFile >> "CfgAmmo" >> _ammo >> "visibleFire"); -_visibleFireTime = getNumber (configFile >> "CfgAmmo" >> _ammo >> "visibleFireTime"); - -_nvgBrightnessCoef = 1 + (_player getVariable ["AGM_NVGBrightness", 0]) / 4; - -_fnc_isTracer = { - private ["_indexShot", "_lastRoundsTracer", "_tracersEvery"]; - - if (getNumber (configFile >> "CfgAmmo" >> _ammo >> "nvgOnly") > 0) exitWith {false}; - - _indexShot = (_player ammo _weapon) + 1; - - _lastRoundsTracer = getNumber (configFile >> "CfgMagazines" >> _magazine >> "lastRoundsTracer"); - if (_indexShot <= _lastRoundsTracer) exitWith {true}; - - _tracersEvery = getNumber (configFile >> "CfgMagazines" >> _magazine >> "tracersEvery"); - if (_tracersEvery == 0) exitWith {false}; - - (_indexShot - _lastRoundsTracer) % _tracersEvery == 0 -}; - -if (call _fnc_isTracer) then { - _visibleFire = _visibleFire + 2; - _visibleFireTime = _visibleFireTime + 2; -}; - -_darkness = 1 - (call AGM_Core_fnc_ambientBrightness); - -_visibleFire = _darkness * _visibleFireCoef * _visibleFire * _nvgBrightnessCoef / 10 min 1; -_visibleFireTime = _darkness * _visibleFireTimeCoef * _visibleFireTime * _nvgBrightnessCoef / 10 min 0.5; - -["NightVision", [_visibleFire, _visibleFireTime], {format ["visibleFire: %1 - visibleFireTime: %2", _this select 0, _this select 1]}] call AGM_Debug_fnc_log; - -AGM_NightVision_ppEffectMuzzleFlash ppEffectAdjust [1, 1, _visibleFire, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]]; -AGM_NightVision_ppEffectMuzzleFlash ppEffectCommit 0; - -AGM_NightVision_ppEffectMuzzleFlash ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]]; -AGM_NightVision_ppEffectMuzzleFlash ppEffectCommit _visibleFireTime; diff --git a/TO_MERGE/agm/NightVision/functions/fn_decreaseNVGBrightness.sqf b/TO_MERGE/agm/NightVision/functions/fn_decreaseNVGBrightness.sqf deleted file mode 100644 index 17c9db1072..0000000000 --- a/TO_MERGE/agm/NightVision/functions/fn_decreaseNVGBrightness.sqf +++ /dev/null @@ -1,20 +0,0 @@ -// by commy2 - -private ["_player", "_vehicle", "_brightness"]; - -_player = _this select 0; -_vehicle = _this select 1; - -_brightness = _player getVariable ["AGM_NVGBrightness", 0]; - -if (_brightness > -1) then { - _brightness = round (10 * _brightness - 1) / 10; - - _player setVariable ["AGM_NVGBrightness", _brightness, false]; - - AGM_NightVision_ppEffectNVGBrightness ppEffectAdjust [1, 1, _brightness / 4, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]]; - AGM_NightVision_ppEffectNVGBrightness ppEffectCommit 0; - - [format [localize "STR_AGM_NightVision_NVGBrightness", format ["%1%", _brightness * 100]]] call AGM_Core_fnc_displayTextStructured; - playSound "AGM_Sound_Click"; -}; diff --git a/TO_MERGE/agm/NightVision/functions/fn_increaseNVGBrightness.sqf b/TO_MERGE/agm/NightVision/functions/fn_increaseNVGBrightness.sqf deleted file mode 100644 index 112665fb59..0000000000 --- a/TO_MERGE/agm/NightVision/functions/fn_increaseNVGBrightness.sqf +++ /dev/null @@ -1,20 +0,0 @@ -// by commy2 - -private ["_player", "_vehicle", "_brightness"]; - -_player = _this select 0; -_vehicle = _this select 1; - -_brightness = _player getVariable ["AGM_NVGBrightness", 0]; - -if (_brightness < 1) then { - _brightness = round (10 * _brightness + 1) / 10; - - _player setVariable ["AGM_NVGBrightness", _brightness, false]; - - AGM_NightVision_ppEffectNVGBrightness ppEffectAdjust [1, 1, _brightness / 4, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]]; - AGM_NightVision_ppEffectNVGBrightness ppEffectCommit 0; - - [format [localize "STR_AGM_NightVision_NVGBrightness", format ["%1%", _brightness * 100]]] call AGM_Core_fnc_displayTextStructured; - playSound "AGM_Sound_Click"; -}; diff --git a/TO_MERGE/agm/NightVision/nightVision.sqf b/TO_MERGE/agm/NightVision/nightVision.sqf deleted file mode 100644 index 9008708f19..0000000000 --- a/TO_MERGE/agm/NightVision/nightVision.sqf +++ /dev/null @@ -1,100 +0,0 @@ -//by commy2 - -private ["_currentVehicle", "_currentTurret", "_currentHMD", "_grainSetting", "_blurSetting"]; - -_currentView = ""; -_currentVehicle = objNull; -_currentTurret = [-1]; -_currentHMD = ""; - -while {true} do { - AGM_NightVision_ppEffect ppEffectEnable false; - AGM_NightVision_ppEffectBlur ppEffectEnable false; - AGM_NightVision_ppEffectRadialBlur ppEffectEnable false; - AGM_NightVision_ppEffectNVGBrightness ppEffectEnable false; - - waitUntil {currentVisionMode AGM_player == 1}; - - AGM_NightVision_ppEffect ppEffectEnable true; - AGM_NightVision_ppEffectBlur ppEffectEnable true; - AGM_NightVision_ppEffectRadialBlur ppEffectEnable true; - AGM_NightVision_ppEffectNVGBrightness ppEffectEnable true; - - waitUntil { - // any updates? - if (hmd AGM_player != _currentHMD || {cameraView != _currentView} || {vehicle AGM_player != _currentVehicle} || {!(_currentTurret isEqualTo []) && {AGM_player != _currentVehicle turretUnit _currentTurret}}) then { - _currentHMD = hmd AGM_player; - _currentView = cameraView; - _currentVehicle = vehicle AGM_player; - _currentTurret = [AGM_player] call AGM_Core_fnc_getTurretIndex; - - private ["_config", "_fnc_isUsingHMD"]; - _config = configFile >> "CfgVehicles" >> typeOf _currentVehicle; - - _fnc_isUsingHMD = { - if (_currentView != "GUNNER") exitWith {true}; // asume hmd usage outside of gunner view - - if (AGM_player == driver _currentVehicle) exitWith { - !("NVG" in getArray (_config >> "ViewOptics" >> "visionMode")); - }; - - private "_turretConfig"; - _turretConfig = [_config, _currentTurret] call AGM_Core_fnc_getTurretConfigPath; - _turretConfig = _turretConfig >> "OpticsIn"; - - private "_result"; - _result = true; - for "_index" from 0 to (count _turretConfig - 1) do { - if ("NVG" in getArray (_turretConfig select _index >> "visionMode")) exitWith {_result = false}; - true - }; - - _result - }; - - // on foot or in vehicle using hmd - if (_currentVehicle == AGM_player || _fnc_isUsingHMD) then { - _grainSetting = getNumber (configFile >> "CfgWeapons" >> _currentHMD >> "AGM_NightVision_grain"); - _blurSetting = getNumber (configFile >> "CfgWeapons" >> _currentHMD >> "AGM_NightVision_blur"); - _radBlurSetting = getNumber (configFile >> "CfgWeapons" >> _currentHMD >> "AGM_NightVision_radBlur"); - - AGM_NightVision_ppEffect ppEffectAdjust [0.25, 2.5, 2.5, _grainSetting, _grainSetting, false]; - AGM_NightVision_ppEffect ppEffectCommit 0; - AGM_NightVision_ppEffectBlur ppEffectAdjust [_blurSetting]; - AGM_NightVision_ppEffectBlur ppEffectCommit 0; - AGM_NightVision_ppEffectRadialBlur ppEffectAdjust [_radBlurSetting, _radBlurSetting, 0.2, 0.2]; - AGM_NightVision_ppEffectRadialBlur ppEffectCommit 0; - - // in vehicle and not using hmd - } else { - _grainSetting = _currentVehicle getVariable ["AGM_NightVision_grain", getNumber (_config >> "AGM_NightVision_grain")]; - _blurSetting = _currentVehicle getVariable ["AGM_NightVision_blur", getNumber (_config >> "AGM_NightVision_blur")]; - _radBlurSetting = _currentVehicle getVariable ["AGM_NightVision_radBlur", getNumber (_config >> "AGM_NightVision_radBlur")]; - - AGM_NightVision_ppEffect ppEffectAdjust [0.25, 2.5, 2.5, _grainSetting, _grainSetting, false]; - AGM_NightVision_ppEffect ppEffectCommit 0; - AGM_NightVision_ppEffectBlur ppEffectAdjust [_blurSetting]; - AGM_NightVision_ppEffectBlur ppEffectCommit 0; - AGM_NightVision_ppEffectRadialBlur ppEffectAdjust [_radBlurSetting, _radBlurSetting, 0.2, 0.2]; - AGM_NightVision_ppEffectRadialBlur ppEffectCommit 0; - }; - }; - - // Detect if curator interface is open and disable effects - if (!isNull findDisplay 312) then { - AGM_NightVision_ppEffect ppEffectEnable false; - AGM_NightVision_ppEffectBlur ppEffectEnable false; - AGM_NightVision_ppEffectRadialBlur ppEffectEnable false; - AGM_NightVision_ppEffectNVGBrightness ppEffectEnable false; - - waitUntil {isNull findDisplay 312}; - - AGM_NightVision_ppEffect ppEffectEnable true; - AGM_NightVision_ppEffectBlur ppEffectEnable true; - AGM_NightVision_ppEffectRadialBlur ppEffectEnable true; - AGM_NightVision_ppEffectNVGBrightness ppEffectEnable true; - }; - - currentVisionMode AGM_player != 1 - }; -}; diff --git a/TO_MERGE/agm/NightVision/stringtable.xml b/TO_MERGE/agm/NightVision/stringtable.xml deleted file mode 100644 index 7c9a7bf4f3..0000000000 --- a/TO_MERGE/agm/NightVision/stringtable.xml +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - NV Goggles (Gen1) - Noktovizor (Gen1) - JVN (Gen1) - NS-Brille (Gen1) - Occhiali notturni (Gen1) - Gogle noktowizyjne (Gen1) - Óculos de visão noturna (Gen1) - ПНВ (Gen1) - Sistema de visión nocturna (Gen1) - - - NV Goggles (Gen2) - Noktovizor (Gen2) - JVN (Gen2) - NS-Brille (Gen2) - Occhiali notturni (Gen2) - Gogle noktowizyjne (Gen2) - Óculos de visão noturna (Gen2) - ПНВ (Gen2) - Sistema de visión nocturna (Gen2) - - - NV Goggles (Gen3) - Noktovizor (Gen3) - JVN (Gen3) - NS-Brille (Gen3) - Occhiali notturni (Gen3) - Gogle noktowizyjne (Gen3) - Óculos de visão noturna (Gen3) - ПНВ (Gen3) - Sistema de visión nocturna (Gen3) - - - NV Goggles (Gen3, Brown) - Noktovizor (Gen3, hnědý) - JVN (Gen3, marron) - NS-Brille (Gen3, Braun) - Occhiali notturni (Gen3, marroni) - Gogle noktowizyjne (Gen3, brązowe) - Óculos de visão noturna (Gen3, marrons) - ПНВ (Gen3, коричневый) - Sistema de visión nocturna (Gen3, marrón) - - - NV Goggles (Gen3, Green) - Noktovizor (Gen3, zelený) - JVN (Gen3, vertes) - NS-Brille (Gen3, Grün) - Occhiali notturni (Gen3, verdi) - Gogle noktowizyjne (Gen3, zielone) - Óculos de visão noturna (Gen3, verdes) - ПНВ (Gen3, зеленый) - Sistema de visión nocturna (Gen3, verde) - - - NV Goggles (Gen3, Black) - Noktovizor (Gen3, černý) - JVN (Gen3, noires) - NS-Brille (Gen3, Schwarz) - Occhiali notturni (Gen3, neri) - Gogle noktowizyjne (Gen3, czarne) - Óculos de visão noturna (Gen3, pretos) - ПНВ (Gen3, черный) - Sistema de visión nocturna (Gen3, negro) - - - NV Goggles (Gen4) - Noktovizor (Gen4) - JVN (Gen4) - NS-Brille (Gen4) - Occhiali notturni (Gen4) - Gogle noktowizyjne (Gen4) - Óculos de visão noturna (Gen4) - ПНВ (Gen4) - Sistema de visión nocturna (Gen4) - - - NV Goggles (Wide) - NS-Brille (Weitwinkel) - Sistema de visión nocturna (Panorámicas) - Gogle noktowizyjne (panoramiczne) - Noktovizor (Široký) - ПНВ (Широкий) - - - Brightness: %1 - Helligkeit: %1 - Brillo: %1 - Czułość: %1 - Zvýšení: %1 - Luminosité : %1 - Контраст: - Fényerő: %1 - Luminosidade: %1 - Luminosità: %1 - - - Increase NVG Brightness - Nachtsichtgerätshelligkeit erhöhen - Aumentar el brillo de las NVG - Zwiększ czułość noktowizji - Zvýšení jasu noktovizoru - Augmenter la luminosité des JVN - Увеличить яркость ПНВ - Fényerő növelése - Aumentar Luminosidade do EVN - Aumenta la luminosità dell'NVG - - - Decrease NVG Brightness - Nachtsichtgerätshelligkeit verringern - Disminuir el brillo de las NVG - Zmniejsz czułość noktowizji - Snížení jasu noktovizoru - Baisser la luminosité des JVN - Уменьшить яркость ПНВ - Fényerő csökkentése - Diminuir Luminosidade do EVN - Riduci la luminosità dell'NVG - - - diff --git a/addons/nightvision/CfgEventHandlers.hpp b/addons/nightvision/CfgEventHandlers.hpp index fb2214f933..d76482dd7f 100644 --- a/addons/nightvision/CfgEventHandlers.hpp +++ b/addons/nightvision/CfgEventHandlers.hpp @@ -16,4 +16,4 @@ class Extended_FiredBIS_EventHandlers { clientFiredBIS = QUOTE( _this call FUNC(blending) ); }; }; -}; \ No newline at end of file +}; diff --git a/addons/nightvision/config.cpp b/addons/nightvision/config.cpp index 62dedf6523..d5a2274b55 100644 --- a/addons/nightvision/config.cpp +++ b/addons/nightvision/config.cpp @@ -16,7 +16,9 @@ class CfgPatches { #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" -class ACE_Core_Default_Keys { + +// class EGVAR(common,Default_Keys) { //??? +class ACE_common_Default_Keys { class increaseNVGBrightness { displayName = "$STR_ACE_NightVision_IncreaseNVGBrightness"; condition = QUOTE( currentVisionMode _player == 1 );