DayZ 1.24
Loading...
Searching...
No Matches
ShockDealtEffect Class Reference
Collaboration diagram for ShockDealtEffect:
[legend]

Private Member Functions

void ShockDealtEffect (float intensity_max)
 
void ~ShockDealtEffect ()
 
void Update (float deltatime)
 

Private Attributes

const float INTENSITY_COEF_OVERALL = 0.8
 
const float INTENSITY_COEF_BLUR = 1
 
const float INTENSITY_COEF_COLOR = 0.2
 
const float INTENSITY_COEF_VIGNETTE = 0.7
 
const float DURATION_MIN = 0.6
 
ref Param3< float, float, floatm_EffectParam
 
float m_HitDuration
 
float m_BreakPoint
 
float m_TimeActive
 
float m_ShockIntensityMax
 

Detailed Description

Definition at line 1 of file ShockHitReaction.c.

Constructor & Destructor Documentation

◆ ShockDealtEffect()

void ShockDealtEffect::ShockDealtEffect ( float intensity_max)
inlineprivate

Definition at line 16 of file ShockHitReaction.c.

17 {
22
24 //Print(intensity_max);
25 //Print("HitSyncDebug | ShockDealtEffect: " + GetGame().GetPlayer().GetSimulationTimeStamp());
26 }
Definition EnMath.c:7
const float DURATION_MIN
ref Param3< float, float, float > m_EffectParam
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'.

References Math::Clamp(), DURATION_MIN, m_BreakPoint, m_EffectParam, m_HitDuration, and m_ShockIntensityMax.

◆ ~ShockDealtEffect()

void ShockDealtEffect::~ShockDealtEffect ( )
inlineprivate

Definition at line 28 of file ShockHitReaction.c.

29 {
30 if (GetGame())
32 }
proto native CGame GetGame()

References GetGame().

Member Function Documentation

◆ Update()

void ShockDealtEffect::Update ( float deltatime)
inlineprivate

Definition at line 34 of file ShockHitReaction.c.

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 }
const float INTENSITY_COEF_VIGNETTE
const float INTENSITY_COEF_COLOR
const float INTENSITY_COEF_BLUR
const float INTENSITY_COEF_OVERALL
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...

References Math::Clamp(), INTENSITY_COEF_BLUR, INTENSITY_COEF_COLOR, INTENSITY_COEF_OVERALL, INTENSITY_COEF_VIGNETTE, Math::InverseLerp(), Math::Lerp(), m_BreakPoint, m_EffectParam, m_HitDuration, m_ShockIntensityMax, and m_TimeActive.

Member Data Documentation

◆ DURATION_MIN

const float ShockDealtEffect::DURATION_MIN = 0.6
private

Definition at line 7 of file ShockHitReaction.c.

Referenced by ShockDealtEffect().

◆ INTENSITY_COEF_BLUR

const float ShockDealtEffect::INTENSITY_COEF_BLUR = 1
private

Definition at line 4 of file ShockHitReaction.c.

Referenced by Update().

◆ INTENSITY_COEF_COLOR

const float ShockDealtEffect::INTENSITY_COEF_COLOR = 0.2
private

Definition at line 5 of file ShockHitReaction.c.

Referenced by Update().

◆ INTENSITY_COEF_OVERALL

const float ShockDealtEffect::INTENSITY_COEF_OVERALL = 0.8
private

Definition at line 3 of file ShockHitReaction.c.

Referenced by Update().

◆ INTENSITY_COEF_VIGNETTE

const float ShockDealtEffect::INTENSITY_COEF_VIGNETTE = 0.7
private

Definition at line 6 of file ShockHitReaction.c.

Referenced by Update().

◆ m_BreakPoint

float ShockDealtEffect::m_BreakPoint
private

Definition at line 12 of file ShockHitReaction.c.

Referenced by ShockDealtEffect(), and Update().

◆ m_EffectParam

ref Param3<float, float, float> ShockDealtEffect::m_EffectParam
private

Definition at line 9 of file ShockHitReaction.c.

Referenced by ShockDealtEffect(), and Update().

◆ m_HitDuration

float ShockDealtEffect::m_HitDuration
private

Definition at line 11 of file ShockHitReaction.c.

Referenced by ShockDealtEffect(), and Update().

◆ m_ShockIntensityMax

float ShockDealtEffect::m_ShockIntensityMax
private

Definition at line 14 of file ShockHitReaction.c.

Referenced by ShockDealtEffect(), and Update().

◆ m_TimeActive

float ShockDealtEffect::m_TimeActive
private

Definition at line 13 of file ShockHitReaction.c.

Referenced by Update().


The documentation for this class was generated from the following file: