DayZ
1.24
Loading...
Searching...
No Matches
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
}
slotName
PlayerSpawnPreset slotName
m_DefaultRadius
float m_DefaultRadius
Definition
ContaminatedArea_Dynamic.c:14
m_DefaultBrightness
enum eAreaDecayStage m_DefaultBrightness
Param3
Definition
EntityAI.c:95
SpotLightBase
Definition
CarLightBase.c:2
SpotLightBase::SetIntensity
void SetIntensity(float coef, float time)
Definition
PistollightLight.c:21
SpotLightBase::UpdateLightMode
override void UpdateLightMode(string slotName)
Definition
PistollightLight.c:27
SpotLightBase::PistollightLight
void PistollightLight()
Definition
PistollightLight.c:8
scripts
4_World
Entities
ScriptedLightBase
SpotLightBase
PistollightLight.c
Generated by
1.10.0