Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
carrearlightbase.c
Go to the documentation of this file.
2 {
3  // Brake light only. These are just some default values which are overwritten down the hierarchy.
4  float m_SegregatedBrakeBrightness = 2;
5  float m_SegregatedBrakeRadius = 6;
6  float m_SegregatedBrakeAngle = 180;
7  vector m_SegregatedBrakeColorRGB = Vector(1, 0.05, 0.05);
8 
9  void CarRearLight()
10  {
11  // These are just some default values which can be overwrittend down in the hierarchy.
12  // Reverse light only
13  m_SegregatedBrightness = 2;
14  m_SegregatedRadius = 10;
15  m_SegregatedAngle = 180;
16  m_SegregatedColorRGB = Vector(1.0, 1.0, 1.0);
17 
18  // Brake & Revese lights combined
19  m_AggregatedBrightness = 2.5;
20  m_AggregatedRadius = 12;
21  m_AggregatedAngle = 180;
22  m_AggregatedColorRGB = Vector(1.0, 0.5, 0.5);
23 
24  FadeIn(0.1);
25  SetFadeOutTime(0.1);
26  SetVisibleDuringDaylight(false);
27  SetCastShadow(false);
28  SetFlareVisible(false);
29  EnableSpecular(false); // Specular is disabled because it causes ugly shining on cars
30 
31  SegregateLight();
32  }
33 
34  void SetAsSegregatedBrakeLight()
35  {
36  SetRadiusTo(m_SegregatedBrakeRadius);
37  SetSpotLightAngle(m_SegregatedBrakeAngle);
38  SetBrightnessTo(m_SegregatedBrakeBrightness);
39  SetAmbientColor(m_SegregatedBrakeColorRGB[0], m_SegregatedBrakeColorRGB[1], m_SegregatedBrakeColorRGB[2]);
40  SetDiffuseColor(m_SegregatedBrakeColorRGB[0], m_SegregatedBrakeColorRGB[1], m_SegregatedBrakeColorRGB[2]);
41  SetFadeOutTime(0.1);
42  SetFlareVisible(false);
43  }
44 
45  void SetAsSegregatedReverseLight()
46  {
47  SetRadiusTo(m_SegregatedRadius);
48  SetSpotLightAngle(m_SegregatedAngle);
49  SetBrightnessTo(m_SegregatedBrightness);
50  SetAmbientColor(m_SegregatedColorRGB[0], m_SegregatedColorRGB[1], m_SegregatedColorRGB[2]);
51  SetDiffuseColor(m_SegregatedColorRGB[0], m_SegregatedColorRGB[1], m_SegregatedColorRGB[2]);
52  SetFadeOutTime(0.1);
53  SetFlareVisible(false);
54  }
55 }
CarRearLightBase
Definition: civiliansedanrearlight.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.