PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
ShockHandler Class Reference

Private Member Functions

void ShockHandler (PlayerBase player)
 
void Update (float deltaT)
 
float GetCurrentShock ()
 
float GetShock ()
 
void SetShock (float dealtShock)
 
private void DealShock ()
 
void CheckValue (bool forceUpdate)
 
protected void Synchronize ()
 
protected float BaseEffectIntensityCalc ()
 
protected float AddEffectBobbing (float baseVal)
 adds bobbing, also clamps to valid range
 
float SetMultiplier (float mult)
 
private float NormalizeShockVal (float shock)
 
private float LerpVignette (float x, float y, float deltaT)
 
private void ShockHitEffect (float compareBase)
 Deprecated.
 

Private Attributes

protected const float UPDATE_THRESHOLD = 3
 
const float VALUE_CHECK_INTERVAL = 0.95
 
private const int INTENSITY_FACTOR = 1
 
private const int VIGNETTE_INTENSITY_MAX = 1
 
private const int VIGNETTE_INTENSITY_MAX_TOTAL = 2
 
private const float SMOOTHING_MAX_INCR = 0.05
 
private const float SMOOTHING_MAX_DECR = 0.01
 
private const float PULSE_PERIOD = 0.5
 
private const float PULSE_AMPLITUDE = 0.05
 
protected float m_Shock
 
protected float m_LastEffectIntensityValue
 
protected float m_ShockValueMax
 
protected float m_CumulatedShock
 
private float m_TimeSinceLastTick = VALUE_CHECK_INTERVAL + 1
 works ok on server, but does nothing for client. See deprecated stuff.
 
private float m_ShockMultiplier = 1
 
private float m_PrevVignette
 
private float m_PulseTimer
 
PPERequester_TunnelVisionEffects m_Requester
 
protected ref Param1< floatm_Param
 
protected PlayerBase m_Player
 
private const int LIGHT_SHOCK_HIT = 33
 
private const int MID_SHOCK_HIT = 67
 Deprecated.
 
private const int HEAVY_SHOCK_HIT = 100
 Deprecated.
 
protected float m_ShockValueThreshold
 Deprecated.
 
private float m_LerpRes
 Deprecated.
 

Constructor & Destructor Documentation

◆ ShockHandler()

Member Function Documentation

◆ AddEffectBobbing()

protected float AddEffectBobbing ( float  baseVal)
inlineprivate

adds bobbing, also clamps to valid range

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

Referenced by Update().

◆ BaseEffectIntensityCalc()

protected float BaseEffectIntensityCalc ( )
inlineprivate

◆ CheckValue()

void CheckValue ( bool  forceUpdate)
inlineprivate

◆ DealShock()

private void DealShock ( )
inlineprivate

References GetGame(), m_CumulatedShock, and m_Player.

Referenced by CheckValue().

◆ GetCurrentShock()

float GetCurrentShock ( )
inlineprivate

References m_Player.

◆ GetShock()

float GetShock ( )
inlineprivate

References m_Shock.

◆ LerpVignette()

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

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

◆ NormalizeShockVal()

private float NormalizeShockVal ( float  shock)
inlineprivate

◆ SetMultiplier()

float SetMultiplier ( float  mult)
inlineprivate

References m_ShockMultiplier.

◆ SetShock()

void SetShock ( float  dealtShock)
inlineprivate

References CheckValue(), and m_Shock.

◆ ShockHitEffect()

private void ShockHitEffect ( float  compareBase)
inlineprivate

◆ Synchronize()

protected void Synchronize ( )
inlineprivate

◆ Update()

Field Documentation

◆ HEAVY_SHOCK_HIT

private const int HEAVY_SHOCK_HIT = 100
private

Deprecated.

Referenced by ShockHitEffect().

◆ INTENSITY_FACTOR

private const int INTENSITY_FACTOR = 1
private

Referenced by NormalizeShockVal().

◆ LIGHT_SHOCK_HIT

private const int LIGHT_SHOCK_HIT = 33
private

Referenced by ShockHitEffect().

◆ m_CumulatedShock

protected float m_CumulatedShock
private

◆ m_LastEffectIntensityValue

protected float m_LastEffectIntensityValue
private

Referenced by BaseEffectIntensityCalc().

◆ m_LerpRes

private float m_LerpRes
private

Deprecated.

◆ m_Param

protected ref Param1<float> m_Param
private

Referenced by ShockHandler(), and Update().

◆ m_Player

◆ m_PrevVignette

private float m_PrevVignette
private

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

◆ m_PulseTimer

private float m_PulseTimer
private

Referenced by AddEffectBobbing(), and Update().

◆ m_Requester

PPERequester_TunnelVisionEffects m_Requester
private

Referenced by ShockHandler(), and Update().

◆ m_Shock

protected float m_Shock
private

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

◆ m_ShockMultiplier

private float m_ShockMultiplier = 1
private

Referenced by CheckValue(), and SetMultiplier().

◆ m_ShockValueMax

protected float m_ShockValueMax
private

◆ m_ShockValueThreshold

protected float m_ShockValueThreshold
private

Deprecated.

Referenced by ShockHandler().

◆ m_TimeSinceLastTick

private float m_TimeSinceLastTick = VALUE_CHECK_INTERVAL + 1
private

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

Referenced by Update().

◆ MID_SHOCK_HIT

private const int MID_SHOCK_HIT = 67
private

Deprecated.

Referenced by ShockHitEffect().

◆ PULSE_AMPLITUDE

private const float PULSE_AMPLITUDE = 0.05
private

Referenced by AddEffectBobbing().

◆ PULSE_PERIOD

private const float PULSE_PERIOD = 0.5
private

Referenced by AddEffectBobbing().

◆ SMOOTHING_MAX_DECR

private const float SMOOTHING_MAX_DECR = 0.01
private

Referenced by BaseEffectIntensityCalc().

◆ SMOOTHING_MAX_INCR

private const float SMOOTHING_MAX_INCR = 0.05
private

Referenced by BaseEffectIntensityCalc().

◆ UPDATE_THRESHOLD

protected const float UPDATE_THRESHOLD = 3
private

Referenced by CheckValue(), and ShockHitEffect().

◆ VALUE_CHECK_INTERVAL

const float VALUE_CHECK_INTERVAL = 0.95
private

Referenced by Update().

◆ VIGNETTE_INTENSITY_MAX

private const int VIGNETTE_INTENSITY_MAX = 1
private

◆ VIGNETTE_INTENSITY_MAX_TOTAL

private const int VIGNETTE_INTENSITY_MAX_TOTAL = 2
private

Referenced by AddEffectBobbing().


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