mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Night Vision - Add prefix to colorPreset
(#9520)
* Add ACE Prefix to colorPreset, update docs. * remove pointless bwc
This commit is contained in:
parent
c92eca7751
commit
262b7fe5c6
@ -27,7 +27,8 @@ private _nvgGen = 3;
|
|||||||
private _blurRadius = -1;
|
private _blurRadius = -1;
|
||||||
|
|
||||||
// Adds Array of Params / Original ACE3's (ST's) by default. (NVG_GREEN_PRESET)
|
// Adds Array of Params / Original ACE3's (ST's) by default. (NVG_GREEN_PRESET)
|
||||||
private _preset = getArray (configFile >> "CfgWeapons" >> "NVGoggles" >> "colorPreset");
|
private _preset = getArray (configFile >> "CfgWeapons" >> "NVGoggles" >> QGVAR(colorPreset));
|
||||||
|
|
||||||
if ((alive ACE_player) && {isNull (ACE_controlledUAV select 0)}) then {
|
if ((alive ACE_player) && {isNull (ACE_controlledUAV select 0)}) then {
|
||||||
if (((vehicle ACE_player) == ACE_player) || {
|
if (((vehicle ACE_player) == ACE_player) || {
|
||||||
// Test if we are using player's nvg or if sourced from vehicle:
|
// Test if we are using player's nvg or if sourced from vehicle:
|
||||||
@ -47,7 +48,7 @@ if ((alive ACE_player) && {isNull (ACE_controlledUAV select 0)}) then {
|
|||||||
TRACE_1("souce: binocular",binocular ACE_player); // Source is from player's binocular (Rangefinder/Vector21bNite)
|
TRACE_1("souce: binocular",binocular ACE_player); // Source is from player's binocular (Rangefinder/Vector21bNite)
|
||||||
private _config = configFile >> "CfgWeapons" >> (binocular ACE_player);
|
private _config = configFile >> "CfgWeapons" >> (binocular ACE_player);
|
||||||
if (isNumber (_config >> QGVAR(generation))) then {_nvgGen = getNumber (_config >> QGVAR(generation));};
|
if (isNumber (_config >> QGVAR(generation))) then {_nvgGen = getNumber (_config >> QGVAR(generation));};
|
||||||
if (isArray (_config >> "colorPreset")) then {_preset = getArray (_config >> "colorPreset");};
|
if (isArray (_config >> QGVAR(colorPreset))) then {_preset = getArray (_config >> QGVAR(colorPreset));};
|
||||||
};
|
};
|
||||||
|
|
||||||
TRACE_1("source: hmd",GVAR(playerHMD)); // Source is player's HMD (or possibly a NVG scope, but no good way to detect that)
|
TRACE_1("source: hmd",GVAR(playerHMD)); // Source is player's HMD (or possibly a NVG scope, but no good way to detect that)
|
||||||
@ -62,7 +63,7 @@ if ((alive ACE_player) && {isNull (ACE_controlledUAV select 0)}) then {
|
|||||||
if (isNumber (_config >> QGVAR(bluRadius))) then {_blurRadius = getNumber (_config >> QGVAR(bluRadius));};
|
if (isNumber (_config >> QGVAR(bluRadius))) then {_blurRadius = getNumber (_config >> QGVAR(bluRadius));};
|
||||||
};
|
};
|
||||||
if (isNumber (_config >> QGVAR(generation))) then {_nvgGen = getNumber (_config >> QGVAR(generation));};
|
if (isNumber (_config >> QGVAR(generation))) then {_nvgGen = getNumber (_config >> QGVAR(generation));};
|
||||||
if (isArray (_config >> "colorPreset")) then {_preset = getArray (_config >> "colorPreset");};
|
if (isArray (_config >> QGVAR(colorPreset))) then {_preset = getArray (_config >> QGVAR(colorPreset));};
|
||||||
} else {
|
} else {
|
||||||
TRACE_1("source: vehicle - defaults",typeOf vehicle ACE_player);
|
TRACE_1("source: vehicle - defaults",typeOf vehicle ACE_player);
|
||||||
};
|
};
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
// Effect Settings / Magic values to tweak:
|
// Effect Settings / Magic values to tweak:
|
||||||
|
|
||||||
#define NVG_GREEN_PRESET colorPreset[] = {0, {0.0, 0.0, 0.0, 0.0}, {1.3, 1.2, 0.0, 0.9}, {6, 1, 1, 0.0}}
|
#define NVG_GREEN_PRESET GVAR(colorPreset)[] = {0, {0.0, 0.0, 0.0, 0.0}, {1.3, 1.2, 0.0, 0.9}, {6, 1, 1, 0.0}}
|
||||||
#define NVG_WHITE_PRESET colorPreset[] = {0.0, {0.0, 0.0, 0.0, 0.0}, {1.1, 0.8, 1.9, 0.9}, {1, 1, 6, 0.0}}
|
#define NVG_WHITE_PRESET GVAR(colorPreset)[] = {0.0, {0.0, 0.0, 0.0, 0.0}, {1.1, 0.8, 1.9, 0.9}, {1, 1, 6, 0.0}}
|
||||||
|
|
||||||
// Decreases fog when in air vehicles
|
// Decreases fog when in air vehicles
|
||||||
#define ST_NVG_AIR_FOG_MULTIPLIER 0.5
|
#define ST_NVG_AIR_FOG_MULTIPLIER 0.5
|
||||||
|
@ -27,10 +27,19 @@ class CfgWeapons {
|
|||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
descriptionShort = "Biocular nightvision goggles";
|
descriptionShort = "Biocular nightvision goggles";
|
||||||
displayName = "NV Goggles (Bio)";
|
displayName = "NV Goggles (Bio)";
|
||||||
GVAR(border) = QPATHTOF(data\nvg_mask_binos_4096.paa); // Edge mask for different tube configurations. Three types: mono, bino and quad.
|
ace_nightvision_border = QPATHTOF(data\nvg_mask_binos_4096.paa); // Edge mask for different tube configurations. Three types: mono, bino and quad.
|
||||||
GVAR(bluRadius) = 0.13; // Edge blur radius.
|
ace_nightvision_bluRadius = 0.13; // Edge blur radius.
|
||||||
GVAR(eyeCups) = 1; // Does have eyecups.
|
ace_nightvision_colorPreset[] = {0, {0.0, 0.0, 0.0, 0.0}, {1.3, 1.2, 0.0, 0.9}, {6, 1, 1, 0.0}}; // Green preset
|
||||||
GVAR(generation) = 4; // Generation 4. Affects image quality.
|
ace_nightvision_eyeCups = 1; // Does have eyecups.
|
||||||
|
ace_nightvision_generation = 4; // Generation 4. Affects image quality.
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 2. Color Presets
|
||||||
|
|
||||||
|
Additional color presets
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
ace_nightvision_colorPreset[] = {0.0, {0.0, 0.0, 0.0, 0.0}, {1.1, 0.8, 1.9, 0.9}, {1, 1, 6, 0.0}}; // White Phosphor Preset
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user