Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_PlayerLoadoutInfo.c
Go to the documentation of this file.
1
class
SCR_PlayerLoadoutInfo
2
{
3
protected
int
m_iPlayerId
;
4
protected
int
m_iLoadoutIndex
= -1;
5
6
//------------------------------------------------------------------------------------------------
8
int
GetLoadoutIndex
()
9
{
10
return
m_iLoadoutIndex
;
11
}
12
13
//------------------------------------------------------------------------------------------------
15
void
SetLoadoutIndex
(
int
loadoutIndex)
16
{
17
m_iLoadoutIndex
= loadoutIndex;
18
}
19
20
//------------------------------------------------------------------------------------------------
22
int
GetPlayerId
()
23
{
24
return
m_iPlayerId
;
25
}
26
27
//------------------------------------------------------------------------------------------------
31
static
SCR_PlayerLoadoutInfo
Create
(
int
playerId)
32
{
33
SCR_PlayerLoadoutInfo
info =
new
SCR_PlayerLoadoutInfo
();
34
info.
m_iPlayerId
= playerId;
35
info.
m_iLoadoutIndex
= -1;
36
return
info;
37
}
38
39
//################################################################################################
41
//------------------------------------------------------------------------------------------------
47
static
bool
Extract
(
SCR_PlayerLoadoutInfo
instance,
ScriptCtx
ctx,
SSnapSerializerBase
snapshot)
48
{
49
snapshot.SerializeInt(instance.
m_iPlayerId
);
50
snapshot.SerializeInt(instance.
m_iLoadoutIndex
);
51
return
true
;
52
}
53
54
//------------------------------------------------------------------------------------------------
60
static
bool
Inject
(
SSnapSerializerBase
snapshot,
ScriptCtx
ctx,
SCR_PlayerLoadoutInfo
instance)
61
{
62
snapshot.SerializeInt(instance.
m_iPlayerId
);
63
snapshot.SerializeInt(instance.
m_iLoadoutIndex
);
64
return
true
;
65
}
66
67
//------------------------------------------------------------------------------------------------
72
static
void
Encode
(
SSnapSerializerBase
snapshot,
ScriptCtx
ctx, ScriptBitSerializer packet)
73
{
74
snapshot.EncodeInt(packet);
// m_iPlayerId
75
snapshot.EncodeInt(packet);
// m_iLoadoutIndex
76
}
77
78
//------------------------------------------------------------------------------------------------
84
static
bool
Decode
(ScriptBitSerializer packet,
ScriptCtx
ctx,
SSnapSerializerBase
snapshot)
85
{
86
snapshot.DecodeInt(packet);
// m_iPlayerId
87
snapshot.DecodeInt(packet);
// m_iLoadoutIndex
88
return
true
;
89
}
90
91
//------------------------------------------------------------------------------------------------
97
static
bool
SnapCompare
(
SSnapSerializerBase
lhs,
SSnapSerializerBase
rhs ,
ScriptCtx
ctx)
98
{
99
return
lhs.CompareSnapshots(rhs, 4+4);
// m_iPlayerId, m_iLoadoutIndex
100
}
101
102
//------------------------------------------------------------------------------------------------
108
static
bool
PropCompare
(
SCR_PlayerLoadoutInfo
instance,
SSnapSerializerBase
snapshot,
ScriptCtx
ctx)
109
{
110
return
snapshot.CompareInt(instance.
m_iPlayerId
)
111
&& snapshot.CompareInt(instance.
m_iLoadoutIndex
);
112
}
113
};
SCR_PlayerLoadoutInfo
Definition
SCR_PlayerLoadoutInfo.c:2
SCR_PlayerLoadoutInfo::PropCompare
static bool PropCompare(SCR_PlayerLoadoutInfo instance, SSnapSerializerBase snapshot, ScriptCtx ctx)
Definition
SCR_PlayerLoadoutInfo.c:108
SCR_PlayerLoadoutInfo::Create
static SCR_PlayerLoadoutInfo Create(int playerId)
Definition
SCR_PlayerLoadoutInfo.c:31
SCR_PlayerLoadoutInfo::SetLoadoutIndex
void SetLoadoutIndex(int loadoutIndex)
Definition
SCR_PlayerLoadoutInfo.c:15
SCR_PlayerLoadoutInfo::Extract
static bool Extract(SCR_PlayerLoadoutInfo instance, ScriptCtx ctx, SSnapSerializerBase snapshot)
Codec methods.
Definition
SCR_PlayerLoadoutInfo.c:47
SCR_PlayerLoadoutInfo::m_iPlayerId
int m_iPlayerId
Definition
SCR_PlayerLoadoutInfo.c:3
SCR_PlayerLoadoutInfo::GetPlayerId
int GetPlayerId()
Definition
SCR_PlayerLoadoutInfo.c:22
SCR_PlayerLoadoutInfo::Decode
static bool Decode(ScriptBitSerializer packet, ScriptCtx ctx, SSnapSerializerBase snapshot)
Definition
SCR_PlayerLoadoutInfo.c:84
SCR_PlayerLoadoutInfo::GetLoadoutIndex
int GetLoadoutIndex()
Definition
SCR_PlayerLoadoutInfo.c:8
SCR_PlayerLoadoutInfo::Inject
static bool Inject(SSnapSerializerBase snapshot, ScriptCtx ctx, SCR_PlayerLoadoutInfo instance)
Definition
SCR_PlayerLoadoutInfo.c:60
SCR_PlayerLoadoutInfo::Encode
static void Encode(SSnapSerializerBase snapshot, ScriptCtx ctx, ScriptBitSerializer packet)
Definition
SCR_PlayerLoadoutInfo.c:72
SCR_PlayerLoadoutInfo::m_iLoadoutIndex
int m_iLoadoutIndex
Definition
SCR_PlayerLoadoutInfo.c:4
SCR_PlayerLoadoutInfo::SnapCompare
static bool SnapCompare(SSnapSerializerBase lhs, SSnapSerializerBase rhs, ScriptCtx ctx)
Definition
SCR_PlayerLoadoutInfo.c:97
SSnapSerializerBase
Definition
EnNetwork.c:269
ScriptCtx
Definition
EnNetwork.c:36
scripts
Game
GameMode
Loadout
SCR_PlayerLoadoutInfo.c
Generated by
1.17.0