Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
ShockHandler Class Reference

Protected Member Functions

void ShockHandler (PlayerBase player)
float AddEffectBobbing (float baseVal)
 adds bobbing, also clamps to valid range
float BaseEffectIntensityCalc ()
float GetCurrentShock ()
float GetShock ()
float SetMultiplier (float mult)
void SetShock (float dealtShock)
void Synchronize ()
void Update (float deltaT)

Protected Attributes

float m_CumulatedShock
float m_LastEffectIntensityValue
ref Param1< floatm_Param
PlayerBase m_Player
float m_Shock
float m_ShockValueMax
float m_ShockValueThreshold
 Deprecated.
const float UPDATE_THRESHOLD = 3
const float VALUE_CHECK_INTERVAL = 0.95

Private Member Functions

void CheckValue (bool forceUpdate)
void DealShock ()
float LerpVignette (float x, float y, float deltaT)
float NormalizeShockVal (float shock)
void ShockHitEffect (float compareBase)
 Deprecated.

Private Attributes

const int HEAVY_SHOCK_HIT = 100
 Deprecated.
const int INTENSITY_FACTOR = 1
const int LIGHT_SHOCK_HIT = 33
float m_LerpRes
 Deprecated.
float m_PrevVignette
float m_PulseTimer
PPERequester_TunnelVisionEffects m_Requester
float m_ShockMultiplier = 1
float m_TimeSinceLastTick = VALUE_CHECK_INTERVAL + 1
 works ok on server, but does nothing for client. See deprecated stuff.
const int MID_SHOCK_HIT = 67
 Deprecated.
const float PULSE_AMPLITUDE = 0.05
const float PULSE_PERIOD = 0.5
const float SMOOTHING_MAX_DECR = 0.01
const float SMOOTHING_MAX_INCR = 0.05
const int VIGNETTE_INTENSITY_MAX = 1
const int VIGNETTE_INTENSITY_MAX_TOTAL = 2

Detailed Description

Definition at line 1 of file shockhandler.c.

Constructor & Destructor Documentation

◆ ShockHandler()

void ShockHandler ( PlayerBase player)
inlineprotected

Member Function Documentation

◆ AddEffectBobbing()

float AddEffectBobbing ( float baseVal)
inlineprotected

adds bobbing, also clamps to valid range

Definition at line 150 of file shockhandler.c.

References Math::Clamp(), m_Player, m_PulseTimer, m_ShockValueMax, PULSE_AMPLITUDE, PULSE_PERIOD, and VIGNETTE_INTENSITY_MAX_TOTAL.

Referenced by Update().

◆ BaseEffectIntensityCalc()

float BaseEffectIntensityCalc ( )
inlineprotected

◆ CheckValue()

void CheckValue ( bool forceUpdate)
inlineprivate

◆ DealShock()

void DealShock ( )
inlineprivate

Definition at line 101 of file shockhandler.c.

References g_Game, m_CumulatedShock, and m_Player.

Referenced by CheckValue().

◆ GetCurrentShock()

float GetCurrentShock ( )
inlineprotected

Definition at line 84 of file shockhandler.c.

References m_Player.

◆ GetShock()

float GetShock ( )
inlineprotected

Definition at line 89 of file shockhandler.c.

References m_Shock.

◆ LerpVignette()

float LerpVignette ( float x,
float y,
float deltaT )
inlineprivate

Definition at line 176 of file shockhandler.c.

References Math::Lerp(), x, and y.

◆ NormalizeShockVal()

float NormalizeShockVal ( float shock)
inlineprivate

Definition at line 169 of file shockhandler.c.

References INTENSITY_FACTOR, and m_ShockValueMax.

Referenced by BaseEffectIntensityCalc(), and CheckValue().

◆ SetMultiplier()

float SetMultiplier ( float mult)
inlineprotected

Definition at line 163 of file shockhandler.c.

References m_ShockMultiplier.

◆ SetShock()

void SetShock ( float dealtShock)
inlineprotected

Definition at line 94 of file shockhandler.c.

References CheckValue(), and m_Shock.

◆ ShockHitEffect()

void ShockHitEffect ( float compareBase)
inlineprivate

Deprecated.

Deprecated

Definition at line 193 of file shockhandler.c.

References HEAVY_SHOCK_HIT, LIGHT_SHOCK_HIT, m_CumulatedShock, m_Player, MID_SHOCK_HIT, and UPDATE_THRESHOLD.

◆ Synchronize()

void Synchronize ( )
inlineprotected

Definition at line 131 of file shockhandler.c.

References m_Player, and DayZPlayerSyncJunctures::SendShock().

Referenced by CheckValue().

◆ Update()

Field Documentation

◆ HEAVY_SHOCK_HIT

const int HEAVY_SHOCK_HIT = 100
private

Deprecated.

Definition at line 188 of file shockhandler.c.

Referenced by ShockHitEffect().

◆ INTENSITY_FACTOR

const int INTENSITY_FACTOR = 1
private

Definition at line 5 of file shockhandler.c.

Referenced by NormalizeShockVal().

◆ LIGHT_SHOCK_HIT

const int LIGHT_SHOCK_HIT = 33
private

Definition at line 186 of file shockhandler.c.

Referenced by ShockHitEffect().

◆ m_CumulatedShock

float m_CumulatedShock
protected

Definition at line 17 of file shockhandler.c.

Referenced by CheckValue(), DealShock(), and ShockHitEffect().

◆ m_LastEffectIntensityValue

float m_LastEffectIntensityValue
protected

Definition at line 15 of file shockhandler.c.

Referenced by BaseEffectIntensityCalc().

◆ m_LerpRes

float m_LerpRes
private

Deprecated.

Definition at line 190 of file shockhandler.c.

◆ m_Param

ref Param1<float> m_Param
protected

Definition at line 27 of file shockhandler.c.

Referenced by ShockHandler(), and Update().

◆ m_Player

◆ m_PrevVignette

float m_PrevVignette
private

Definition at line 20 of file shockhandler.c.

Referenced by ShockHandler(), CheckValue(), and Update().

◆ m_PulseTimer

float m_PulseTimer
private

Definition at line 23 of file shockhandler.c.

Referenced by AddEffectBobbing(), and Update().

◆ m_Requester

PPERequester_TunnelVisionEffects m_Requester
private

Definition at line 26 of file shockhandler.c.

Referenced by ShockHandler(), and Update().

◆ m_Shock

float m_Shock
protected

Definition at line 14 of file shockhandler.c.

Referenced by CheckValue(), GetShock(), and SetShock().

◆ m_ShockMultiplier

float m_ShockMultiplier = 1
private

Definition at line 19 of file shockhandler.c.

Referenced by CheckValue(), and SetMultiplier().

◆ m_ShockValueMax

float m_ShockValueMax
protected

Definition at line 16 of file shockhandler.c.

Referenced by ShockHandler(), AddEffectBobbing(), NormalizeShockVal(), and Update().

◆ m_ShockValueThreshold

float m_ShockValueThreshold
protected

Deprecated.

Definition at line 189 of file shockhandler.c.

Referenced by ShockHandler().

◆ m_TimeSinceLastTick

float m_TimeSinceLastTick = VALUE_CHECK_INTERVAL + 1
private

works ok on server, but does nothing for client. See deprecated stuff.

Definition at line 18 of file shockhandler.c.

Referenced by Update().

◆ MID_SHOCK_HIT

const int MID_SHOCK_HIT = 67
private

Deprecated.

Definition at line 187 of file shockhandler.c.

Referenced by ShockHitEffect().

◆ PULSE_AMPLITUDE

const float PULSE_AMPLITUDE = 0.05
private

Definition at line 12 of file shockhandler.c.

Referenced by AddEffectBobbing().

◆ PULSE_PERIOD

const float PULSE_PERIOD = 0.5
private

Definition at line 11 of file shockhandler.c.

Referenced by AddEffectBobbing().

◆ SMOOTHING_MAX_DECR

const float SMOOTHING_MAX_DECR = 0.01
private

Definition at line 9 of file shockhandler.c.

Referenced by BaseEffectIntensityCalc().

◆ SMOOTHING_MAX_INCR

const float SMOOTHING_MAX_INCR = 0.05
private

Definition at line 8 of file shockhandler.c.

Referenced by BaseEffectIntensityCalc().

◆ UPDATE_THRESHOLD

const float UPDATE_THRESHOLD = 3
protected

Definition at line 3 of file shockhandler.c.

Referenced by CheckValue(), and ShockHitEffect().

◆ VALUE_CHECK_INTERVAL

const float VALUE_CHECK_INTERVAL = 0.95
protected

Definition at line 4 of file shockhandler.c.

Referenced by Update().

◆ VIGNETTE_INTENSITY_MAX

const int VIGNETTE_INTENSITY_MAX = 1
private

Definition at line 6 of file shockhandler.c.

◆ VIGNETTE_INTENSITY_MAX_TOTAL

const int VIGNETTE_INTENSITY_MAX_TOTAL = 2
private

Definition at line 7 of file shockhandler.c.

Referenced by AddEffectBobbing().


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