Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
remotelyactivateditembehaviour.c
Go to the documentation of this file.
1
class
RemotelyActivatedItemBehaviour
2
{
3
protected
EntityAI
m_Parent
;
4
protected
EntityAI
m_PairDevice
;
5
protected
int
m_PairDeviceNetIdLow
;
6
protected
int
m_PairDeviceNetIdHigh
;
7
8
void
RemotelyActivatedItemBehaviour
(notnull
EntityAI
pParent)
9
{
10
m_Parent
= pParent;
11
m_PairDeviceNetIdLow
= -1;
12
m_PairDeviceNetIdHigh
= -1;
13
}
14
15
void
OnVariableSynchronized
()
16
{
17
Pair
();
18
}
19
20
void
Pair
()
21
{
22
EntityAI
device =
EntityAI
.Cast(
GetGame
().GetObjectByNetworkId(
GetPairDeviceNetIdLow
(),
GetPairDeviceNetIdHigh
()));
23
if
(device)
24
{
25
Pair
(device);
26
}
27
}
28
29
void
Pair
(notnull
EntityAI
device)
30
{
31
m_PairDevice
= device;
32
SetPairDeviceNetIds
(device);
33
34
if
(!
m_Parent
.GetPairDevice() ||
m_Parent
.GetPairDevice() !=
m_PairDevice
)
35
{
36
m_PairDevice
.PairRemote(
m_Parent
);
37
}
38
39
m_PairDevice
.SetSynchDirty();
40
m_Parent
.SetSynchDirty();
41
}
42
43
void
Unpair
()
44
{
45
m_PairDeviceNetIdLow
= -1;
46
m_PairDeviceNetIdHigh
= -1;
47
48
if
(
m_PairDevice
)
49
{
50
m_PairDevice
.SetSynchDirty();
51
m_PairDevice
= null;
52
}
53
54
m_Parent
.SetSynchDirty();
55
}
56
57
EntityAI
GetPairDevice
()
58
{
59
return
m_PairDevice
;
60
}
61
62
bool
IsPaired
()
63
{
64
return
m_PairDevice
!= null;
65
}
66
67
void
SetPairDeviceNetIds
(notnull
EntityAI
device)
68
{
69
device.GetNetworkID(
m_PairDeviceNetIdLow
,
m_PairDeviceNetIdHigh
);
70
}
71
72
int
GetPairDeviceNetIdLow
()
73
{
74
return
m_PairDeviceNetIdLow
;
75
}
76
77
int
GetPairDeviceNetIdHigh
()
78
{
79
return
m_PairDeviceNetIdHigh
;
80
}
81
}
EntityAI
class LogManager EntityAI
EntityAI
Definition
inventoryitem.c:2
RemotelyActivatedItemBehaviour
Definition
remotelyactivateditembehaviour.c:2
RemotelyActivatedItemBehaviour::GetPairDeviceNetIdHigh
int GetPairDeviceNetIdHigh()
Definition
remotelyactivateditembehaviour.c:163
RemotelyActivatedItemBehaviour::RemotelyActivatedItemBehaviour
void RemotelyActivatedItemBehaviour(notnull EntityAI pParent)
Definition
remotelyactivateditembehaviour.c:8
RemotelyActivatedItemBehaviour::Unpair
void Unpair()
Definition
remotelyactivateditembehaviour.c:43
RemotelyActivatedItemBehaviour::GetPairDeviceNetIdLow
int GetPairDeviceNetIdLow()
Definition
remotelyactivateditembehaviour.c:158
RemotelyActivatedItemBehaviour::GetPairDevice
EntityAI GetPairDevice()
Definition
remotelyactivateditembehaviour.c:57
RemotelyActivatedItemBehaviour::Pair
void Pair(notnull EntityAI device)
Definition
remotelyactivateditembehaviour.c:29
RemotelyActivatedItemBehaviour::OnVariableSynchronized
void OnVariableSynchronized()
Definition
remotelyactivateditembehaviour.c:15
RemotelyActivatedItemBehaviour::IsPaired
bool IsPaired()
Definition
remotelyactivateditembehaviour.c:62
RemotelyActivatedItemBehaviour::m_Parent
EntityAI m_Parent
Definition
remotelyactivateditembehaviour.c:3
RemotelyActivatedItemBehaviour::m_PairDeviceNetIdLow
int m_PairDeviceNetIdLow
Definition
remotelyactivateditembehaviour.c:6
RemotelyActivatedItemBehaviour::Pair
void Pair()
Definition
remotelyactivateditembehaviour.c:101
RemotelyActivatedItemBehaviour::SetPairDeviceNetIds
void SetPairDeviceNetIds(notnull EntityAI device)
Definition
remotelyactivateditembehaviour.c:153
RemotelyActivatedItemBehaviour::m_PairDevice
EntityAI m_PairDevice
Definition
remotelyactivateditembehaviour.c:5
RemotelyActivatedItemBehaviour::m_PairDeviceNetIdHigh
int m_PairDeviceNetIdHigh
Definition
remotelyactivateditembehaviour.c:7
GetGame
DayZGame GetGame()
Definition
gameplay.c:636
Games
Dayz
scripts
4_world
entities
explosivesbase
remotelyactivateditembehaviour.c
Generated by
1.17.0