Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
pistollightlight.c
Go to the documentation of this file.
1 class PistollightLight extends SpotLightBase
2 {
3  private static float m_DefaultBrightness = 5.25;
4  private static float m_DefaultRadius = 18;
5  private static float m_DefaultAngle = 100;
6 
7 
8  void PistollightLight()
9  {
10  SetVisibleDuringDaylight( true );
11  SetRadiusTo( m_DefaultRadius );
12  SetSpotLightAngle( m_DefaultAngle );
13  SetCastShadow( true );
14  SetBrightnessTo( m_DefaultBrightness );
15  SetFadeOutTime( 0.05 );
16  SetAmbientColor( 0.92, 0.88, 0.82 );
17  SetDiffuseColor( 0.92, 0.88, 0.82 );
18  SetDisableShadowsWithinRadius( 1.2 );
19  }
20 
21  void SetIntensity( float coef, float time )
22  {
23  FadeBrightnessTo( m_DefaultBrightness * coef, time );
24  FadeRadiusTo( m_DefaultRadius * coef, time );
25  }
26 
27  override void UpdateLightMode( string slotName )
28  {
29  switch ( slotName )
30  {
31  case "weaponFlashlight":
32  SetSpotLightAngle( m_DefaultAngle/2 );
33  SetRadiusTo( m_DefaultRadius * 1.8 );
34  break;
35 
36  default:
37  SetSpotLightAngle( m_DefaultAngle );
38  SetRadiusTo( m_DefaultRadius );
39  break;
40  }
41  }
42 }
m_DefaultRadius
protected float m_DefaultRadius
Definition: contaminatedarea_dynamic.c:14
SpotLightBase
Definition: carlightbase.c:1
slotName
PlayerSpawnPreset slotName
m_DefaultBrightness
enum eAreaDecayStage m_DefaultBrightness