Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
pistollightlight.c
Go to the documentation of this file.
1class 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}
PlayerSpawnPreset slotName
float m_DefaultRadius
enum EGrenadeType m_DefaultBrightness
For backward compatibility.