3 const float VAL_FACTOR = 0.85;
4 const float EXPOSURE_MAX = 50;
5 protected float m_Exposure;
6 protected float m_Intensity;
12 if (
GetGame().GetMission() &&
GetGame().GetMission().GetEffectWidgets())
13 GetGame().GetMission().GetEffectWidgets().AddActiveEffects({EffectWidgetsTypes.COVER_FLASHBANG});
26 if (
GetGame().GetMission() &&
GetGame().GetMission().GetEffectWidgets())
27 GetGame().GetMission().GetEffectWidgets().RemoveActiveEffects({EffectWidgetsTypes.COVER_FLASHBANG});
30 override protected void OnUpdate(
float delta)
32 super.OnUpdate(delta);
36 Param1<float> par =
new Param1<float>(1 - m_Intensity);
37 GetGame().GetMission().GetEffectWidgets().UpdateWidgets(EffectWidgetsTypes.COVER_FLASHBANG,0,par,EffectWidgetHandles.FLASHBANG);
41 void SetFlashbangIntensity(
float intensity,
float daytime_toggle)
43 m_Intensity = intensity;
45 if (daytime_toggle <= 5.0)
47 m_Exposure =
Math.Clamp(intensity * daytime_toggle,0.0,EXPOSURE_MAX);
51 m_Exposure =
Easing.EaseInQuart(intensity);
52 m_Exposure =
Math.Clamp(EXPOSURE_MAX * m_Exposure,0.0,EXPOSURE_MAX);
54 overlay_color[3] = intensity;