DayZ 1.24
Loading...
Searching...
No Matches
BulletHitReaction.c File Reference

Go to the source code of this file.

Classes

class  DamageDealtEffect
 

Functions

void EffectRadial (Param param1, Param param2)
 
void ~EffectRadial ()
 
void Update (float deltatime)
 

Variables

class DamageDealtEffect m_TimeActive
 
float m_Divisor = 16
 
float m_Duration = 0.6
 
PPERequester_PainBlur m_PPERequester
 

Function Documentation

◆ EffectRadial()

void EffectRadial ( Param param1,
Param param2 )

Definition at line 55 of file BulletHitReaction.c.

56 {
57 if (param1)
58 {
60 if (p1)
61 {
62 m_Divisor = p1.param1;
63 m_Duration = p1.param2;
64 }
65 }
66
67 if (Class.CastTo(m_PPERequester, PPERequesterBank.GetRequester(PPERequesterBank.REQ_PAINBLUR)))
68 m_PPERequester.Start();
69 }
float m_Divisor
PPERequester_PainBlur m_PPERequester
float m_Duration
Super root of all classes in Enforce script.
Definition EnScript.c:11
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo(), m_Divisor, m_Duration, and m_PPERequester.

Referenced by ManBase::SpawnDamageDealtEffect2().

◆ Update()

void Update ( float deltatime)

Definition at line 77 of file BulletHitReaction.c.

78 {
79
81 float value = 1 - Easing.EaseInQuart(time);
82 float strenght = value / m_Divisor; //The divisor matches the ease curve used
83
85 m_PPERequester.SetRadialBlur(strenght, strenght, 1 - value, 1 - value);
86
87
90 delete this;
91 }
class DamageDealtEffect m_TimeActive
Input value between 0 and 1, returns value adjusted by easing, no automatic clamping of input(do your...
Definition Easing.c:3
static float EaseInQuart(float t)
Definition Easing.c:56
Definition EnMath.c:7
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...

References Easing::EaseInQuart(), Math::InverseLerp(), m_Divisor, m_Duration, m_PPERequester, and m_TimeActive.

◆ ~EffectRadial()

Definition at line 71 of file BulletHitReaction.c.

72 {
74 m_PPERequester.SetRadialBlur(0, 0, 0, 0);
75 }

References m_PPERequester.

Variable Documentation

◆ m_Divisor

float m_Divisor = 16

Definition at line 51 of file BulletHitReaction.c.

Referenced by EffectRadial(), and Update().

◆ m_Duration

◆ m_PPERequester

◆ m_TimeActive

class DamageDealtEffect m_TimeActive

Referenced by Update().