8 float m_EffectStartTime;
12 const float BLUR_STRENGTH_MIN = 0.15;
13 const float BLUR_STRENGTH_MAX = 0.25;
15 const int BLUR_DURATION_TIME_MIN = 1.5;
16 const int BLUR_DURATION_TIME_MAX = 2.5;
18 const int MIN_TIME_BETWEEN_EFFECTS = 25.0;
19 const int MAX_TIME_BETWEEN_EFFECTS = 35.0;
26 m_ID = SymptomIDs.SYMPTOM_FEVERBLUR;
27 m_DestroyOnAnimFinish =
true;
29 m_SyncToClient =
true;
31 if ( !
GetGame().IsDedicatedServer() )
33 Class.CastTo(
m_Requester,PPERequesterBank.GetRequester(PPERequester_FeverEffects));
47 if ( m_EffectStartTime <= 0 )
49 m_EffectStartTime =
Math.RandomFloatInclusive(MIN_TIME_BETWEEN_EFFECTS, MAX_TIME_BETWEEN_EFFECTS);
50 m_BlurDuration =
Math.RandomFloatInclusive(BLUR_DURATION_TIME_MIN, BLUR_DURATION_TIME_MAX);
51 m_BlurStrength =
Math.RandomFloat(BLUR_STRENGTH_MIN, BLUR_STRENGTH_MAX);
55 if ( m_EffectStartTime > 0 &&
m_Time > m_EffectStartTime )
57 m_EffectTime += deltatime / m_BlurDuration;
58 float cos_value =
Math.Sin(m_EffectTime *
Math.PI);
59 float val = cos_value * m_BlurStrength;
64 if ( m_EffectTime >= 1 )
67 m_EffectStartTime = -1;
74 override void OnGetActivatedServer(
PlayerBase player)
79 override void OnGetActivatedClient(
PlayerBase player)
84 override void OnGetDeactivatedServer(
PlayerBase player)
90 override void OnGetDeactivatedClient(
PlayerBase player)