Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
universallightlight.c
Go to the documentation of this file.
1class UniversallightLight extends SpotLightBase
2{
3 private static float m_DefaultBrightness = 6.05;
4 private static float m_DefaultRadius = 25;
5 private static float m_DefaultAngle = 100;
6
7 void UniversallightLight()
8 {
9 SetVisibleDuringDaylight( true );
10 SetRadiusTo( m_DefaultRadius );
11 SetSpotLightAngle( m_DefaultAngle );
12 SetCastShadow( true );
13 SetBrightnessTo( m_DefaultBrightness );
14 SetFadeOutTime( 0.15 );
15 SetAmbientColor( 0.95, 0.88, 0.8 );
16 SetDiffuseColor( 0.95, 0.88, 0.8 );
17 SetDisableShadowsWithinRadius( 1.2 );
18 }
19
20 void SetIntensity( float coef, float time )
21 {
22 FadeBrightnessTo( m_DefaultBrightness * coef, time );
23 FadeRadiusTo( m_DefaultRadius * coef, time );
24 }
25
26 override void UpdateLightMode( string slotName )
27 {
28 switch (slotName)
29 {
30 case "weaponFlashlight":
31 SetSpotLightAngle( m_DefaultAngle/2 );
32 SetRadiusTo( m_DefaultRadius * 1.8 );
33 break;
34
35 default:
36 SetSpotLightAngle( m_DefaultAngle );
37 SetRadiusTo( m_DefaultRadius );
38 break;
39 }
40 }
41}
PlayerSpawnPreset slotName
float m_DefaultRadius
enum EGrenadeType m_DefaultBrightness
For backward compatibility.