Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
anniversaryspotlight.c
Go to the documentation of this file.
1
class
AnniversarySpotLight
: Building
2
{
3
#ifndef SERVER
4
protected
AnniversaryMainLight
m_Light;
5
#endif
6
7
protected
bool
m_LightState;
8
9
void
AnniversarySpotLight
()
10
{
11
RegisterNetSyncVariableBool(
"m_LightState"
);
12
}
13
14
override
void
OnVariablesSynchronized()
15
{
16
super.OnVariablesSynchronized();
17
18
#ifndef SERVER
19
if
(m_LightState)
20
{
21
m_Light
=
AnniversaryMainLight
.Cast(
ScriptedLightBase
.CreateLight(
AnniversaryMainLight
,
GetPosition
()));
22
}
23
else
24
{
25
if
(
m_Light
)
26
m_Light
.FadeOut(0.5);
27
}
28
#endif
29
}
30
31
override
void
EEDelete(
EntityAI
parent)
32
{
33
super.EEDelete(parent);
34
35
#ifndef SERVER
36
if
(
m_Light
)
37
m_Light
.Destroy();
38
#endif
39
}
40
41
void
DeActivate()
42
{
43
m_LightState =
false
;
44
SetSynchDirty();
45
}
46
47
void
Activate()
48
{
49
m_LightState =
true
;
50
SetSynchDirty();
51
}
52
}
AnniversarySpotLight
Definition:
anniversaryspotlight.c:1
m_Light
protected ExplosiveLight m_Light
light
Definition:
explosivesbase.c:31
GetPosition
class JsonUndergroundAreaTriggerData GetPosition
Definition:
undergroundarealoader.c:9
ScriptedLightBase
Definition:
pointlightbase.c:1
AnniversaryMainLight
Definition:
anniversarymainlight.c:1
EntityAI
Definition:
building.c:5
DAYZ
scripts_v1.24.157551
scripts
world
entities
building
specific
anniversaryspotlight.c
Generated by
1.8.17