DayZ 1.24
Loading...
Searching...
No Matches
ShockHitReaction.c
Go to the documentation of this file.
2{
3 const float INTENSITY_COEF_OVERALL = 0.8; //intensity percentage multiplier
4 const float INTENSITY_COEF_BLUR = 1;
5 const float INTENSITY_COEF_COLOR = 0.2;
6 const float INTENSITY_COEF_VIGNETTE = 0.7;
7 const float DURATION_MIN = 0.6;
8
10
15
17 {
22
24 //Print(intensity_max);
25 //Print("HitSyncDebug | ShockDealtEffect: " + GetGame().GetPlayer().GetSimulationTimeStamp());
26 }
27
29 {
30 if (GetGame())
32 }
33
34 void Update(float deltatime)
35 {
36 float value;
37
40 else
41 {
43 value = 1 - tmp_value;
44 }
45
47 value = Math.Clamp(value, 0, 1);
48
49 //value calculations
52
53 //Postprocess application
57
58 m_EffectParam.param1 = blur;
59 m_EffectParam.param2 = vignette;
60 m_EffectParam.param3 = factor;
62
64 delete this;
65 }
66}
Definition EnMath.c:7
void Update(float deltatime)
const float INTENSITY_COEF_VIGNETTE
const float INTENSITY_COEF_COLOR
const float DURATION_MIN
const float INTENSITY_COEF_BLUR
void ShockDealtEffect(float intensity_max)
ref Param3< float, float, float > m_EffectParam
const float INTENSITY_COEF_OVERALL
proto native CGame GetGame()
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...