Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
carlightbase.c
Go to the documentation of this file.
2 {
3  // What follows are just default light parameters which are overwriten down in the hierarchy in constructors.
4  // 'Segregated' means value for a light source that consists of 1 bulb (ex.: when 1 of 2 headlights are destroyed)
5  // 'Aggregated' means value for 1 light source that consists of 2 bulbs (ex.: when both headlights are shining, or brake & reverse lights are shining at once)
6  // Aggregating lights saves a lot of performance
7 
8  float m_SegregatedBrightness = 20;
9  float m_SegregatedRadius = 66;
10  float m_SegregatedAngle = 90;
11  vector m_SegregatedColorRGB = Vector(1.0, 0.8, 0.6);
12 
13  float m_AggregatedBrightness = 30;
14  float m_AggregatedRadius = 100;
15  float m_AggregatedAngle = 100;
16  vector m_AggregatedColorRGB = Vector(1.0, 0.8, 0.6);
17 
18  void CarLightBase()
19  {
20  SetVisibleDuringDaylight(true);
21  SetCastShadow(true);
22  SetFlareVisible(true);
23  FadeIn(0.3);
24  SetFadeOutTime(0.25);
25 
26  }
27 
28  void AggregateLight()
29  {
30  SetRadiusTo(m_AggregatedRadius);
31  SetSpotLightAngle(m_AggregatedAngle);
32  SetBrightnessTo(m_AggregatedBrightness);
33  SetAmbientColor(m_AggregatedColorRGB[0], m_AggregatedColorRGB[1], m_AggregatedColorRGB[2]);
34  SetDiffuseColor(m_AggregatedColorRGB[0], m_AggregatedColorRGB[1], m_AggregatedColorRGB[2]);
35  SetFlareVisible(false);
36  }
37 
38  void SegregateLight()
39  {
40  SetRadiusTo(m_SegregatedRadius);
41  SetSpotLightAngle(m_SegregatedAngle);
42  SetBrightnessTo(m_SegregatedBrightness);
43  SetAmbientColor(m_SegregatedColorRGB[0], m_SegregatedColorRGB[1], m_SegregatedColorRGB[2]);
44  SetDiffuseColor(m_SegregatedColorRGB[0], m_SegregatedColorRGB[1], m_SegregatedColorRGB[2]);
45  SetFlareVisible(true);
46  }
47 }
SpotLightBase
Definition: carlightbase.c:1
vector
Definition: enconvert.c:105
CarLightBase
Definition: carrearlightbase.c:1
Vector
proto native vector Vector(float x, float y, float z)
Vector constructor from components.