DayZ 1.24
Loading...
Searching...
No Matches
PPELightIntensityParamsNative.c
Go to the documentation of this file.
1//---------------------------------------------------------
2//Native exceptions - legacy methods for direct access to specific postprocesses. Each one is evaluated and handled separately, this just connects them to the system.
3
6{
7 //g_Game.SetEVValue
8 static const int PARAM_LIGHT_MULT = 0;
9 static const int PARAM_NOISE_MULT = 1;
10
11 static const int L_0_NVG = 100;
12 static const int L_0_TOXIC_TINT = 200;
13 static const int L_1_NVG = 100;
14 static const int L_1_TOXIC_TINT = 200;
15
17 {
18 return PPEExceptions.NVLIGHTPARAMS;
19 }
20
22 {
23 RegisterParameterScalarFloat(PARAM_LIGHT_MULT, "lightIntensityMul", 1.0, 0.0, 50.0); //some reasonable values
24 RegisterParameterScalarFloat(PARAM_NOISE_MULT, "noiseIntensity", 0.0, 0.0, 50.0); //some reasonable values
25 }
26
27 override void ApplyValueChanges()
28 {
29 if (m_UpdatedParameters.Count() > 0)
30 {
31 SetFinalParameterValue(-1); //unique handling
32 }
33
34 m_UpdatedParameters.Clear();
35 }
36
39 {
41
42 for (int i = 0; i < PARAM_NOISE_MULT + 1; i++)
43 {
45 float value_var_float = Param1<float>.Cast(values).param1;
47 }
48
49 g_Game.NightVissionLightParams(array_values.Get(PARAM_LIGHT_MULT), array_values.Get(PARAM_NOISE_MULT));
50
51 //DbgPrnt("PPEDebug | SetFinalParameterValue | PPELightIntensityParamsNative | float val: " + value_var_float);
52 }
53}
DayZGame g_Game
Definition DayZGame.c:3528
PPEExceptions
Created once, on manager init. Script-side representation of C++ material class, separate handling.
void RegisterParameterScalarFloat(int idx, string parameter_name, float default_value, float min, float max)
WARNING - min/max values are usually taken from Workbench defaults, may not be actual min/max values ...
PPEMatClassParameterCommandData GetParameterCommandData(int parameter_idx)
Some PP effects are handled as hard-coded exceptions, outside of material system. Default == PPEExcep...
ref array< int > m_UpdatedParameters
g_Game.NightVissionLightParams, does not directly use materials. Controls light multiplication and fi...
override void SetFinalParameterValue(int parameter_idx)
Overriden to handle the specific exception.
Param GetCurrentValues()
Careful, only actual values, WITHOUT string.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12