Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_PlayerScoreInfoFiringRange.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
4{
5 int m_iID = -1;
6 int m_iScore = 0;
7 int m_iScoreMax = 0;
8
9 //################################################################################################
11 //------------------------------------------------------------------------------------------------
12 static void Encode(SSnapSerializerBase snapshot, ScriptCtx ctx, ScriptBitSerializer packet)
13 {
14 snapshot.Serialize(packet, 12);
15 }
16
17 //------------------------------------------------------------------------------------------------
18 static bool Decode(ScriptBitSerializer packet, ScriptCtx ctx, SSnapSerializerBase snapshot)
19 {
20 return snapshot.Serialize(packet, 12);
21 }
22
23 //------------------------------------------------------------------------------------------------
24 static bool SnapCompare(SSnapSerializerBase lhs, SSnapSerializerBase rhs, ScriptCtx ctx)
25 {
26 return lhs.CompareSnapshots(rhs, 12);
27 }
28
29 //------------------------------------------------------------------------------------------------
30 static bool PropCompare(SCR_PlayerScoreInfoFiringRange prop, SSnapSerializerBase snapshot, ScriptCtx ctx)
31 {
32 return snapshot.Compare(prop.m_iID, 4)
33 && snapshot.Compare(prop.m_iScore, 4)
34 && snapshot.Compare(prop.m_iScoreMax, 4);
35 }
36
37 //------------------------------------------------------------------------------------------------
38 static bool Extract(SCR_PlayerScoreInfoFiringRange prop, ScriptCtx ctx, SSnapSerializerBase snapshot)
39 {
40 snapshot.SerializeBytes(prop.m_iID, 4);
41 snapshot.SerializeBytes(prop.m_iScore, 4);
42 snapshot.SerializeBytes(prop.m_iScoreMax, 4);
43 return true;
44 }
45
46 //------------------------------------------------------------------------------------------------
47 static bool Inject(SSnapSerializerBase snapshot, ScriptCtx ctx, SCR_PlayerScoreInfoFiringRange prop)
48 {
49 snapshot.SerializeBytes(prop.m_iID, 4);
50 snapshot.SerializeBytes(prop.m_iScore, 4);
51 snapshot.SerializeBytes(prop.m_iScoreMax, 4);
52
53 return true;
54 }
55
56 //################################################################################################
57 //------------------------------------------------------------------------------------------------
59 string GetName()
60 {
61 return SCR_PlayerNamesFilterCache.GetInstance().GetPlayerDisplayName(m_iID);
62 }
63
64 //------------------------------------------------------------------------------------------------
66 void Clear()
67 {
68 m_iScore = 0;
69 m_iScoreMax = 0;
70 }
71
72 //------------------------------------------------------------------------------------------------
75 void Insert(SCR_PlayerScoreInfoFiringRange playerScoreInfoFiringRange)
76 {
77 m_iScore = playerScoreInfoFiringRange.m_iScore;
78 }
79
80 //------------------------------------------------------------------------------------------------
82 int GetScore(SCR_FiringRangeScoringComponent scoringSystemFiringRange)
83 {
84 if (!scoringSystemFiringRange)
85 return 0;
86
87 return m_iScore;
88 }
89
90 //------------------------------------------------------------------------------------------------
92 int GetScoreMax()
93 {
94 return m_iScoreMax;
95 }
96
97 //------------------------------------------------------------------------------------------------
98 int GetScore()
99 {
100 return m_iScore;
101 }
102
103 //------------------------------------------------------------------------------------------------
104 int GetPlayerID()
105 {
106 return m_iID;
107 }
108};
override int GetPlayerID()
proto native void Clear()
Remove all calls from list.