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_MemoryNetworkedStat.c
Go to the documentation of this file.
1
[
BaseContainerProps
()]
2
class
SCR_MemoryNetworkedStat
:
SCR_BaseNetworkedStat
3
{
4
// Last checked local RAM.
5
protected
int
m_iLocalMemory
;
6
7
// Last checked authority RAM.
8
protected
int
m_iAuthorityMemory
;
9
10
//------------------------------------------------------------------------------------------------
11
int
GetLastCheckedLocalMemory
()
12
{
13
if
(
m_iLocalMemory
== 0)
14
return
0;
15
16
return
m_iLocalMemory
/ 1024;
// Division by 1024 for KB to MB conversion.
17
}
18
19
//------------------------------------------------------------------------------------------------
20
int
GetLastCheckedAuthorityMemory
()
21
{
22
if
(
m_iAuthorityMemory
== 0)
23
return
0;
24
25
return
m_iAuthorityMemory
/ 1024;
// Division by 1024 for KB to MB conversion.
26
}
27
28
//------------------------------------------------------------------------------------------------
29
override
void
UpdateStat
()
30
{
31
int
localMemory =
System
.MemoryAllocationKB();
32
if
(localMemory ==
m_iLocalMemory
)
33
return
;
34
35
m_iLocalMemory
= localMemory;
36
37
RplComponent rplComponent =
m_Owner
.GetRplComponent();
38
if
(rplComponent && rplComponent.Role() ==
RplRole
.Authority)
39
{
40
m_iAuthorityMemory
=
m_iLocalMemory
;
41
m_Owner
.SetAuthorityStatValue(
m_eStatType
,
m_iAuthorityMemory
);
42
}
43
44
InvokeStatValueChange
();
45
}
46
47
//------------------------------------------------------------------------------------------------
48
override
void
OnAuthorityStatValueSet
(
int
value)
49
{
50
m_iAuthorityMemory
= value;
51
InvokeStatValueChange
();
52
}
53
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_BaseNetworkedStat
Definition
SCR_BaseNetworkedStat.c:3
SCR_BaseNetworkedStat::m_Owner
SCR_NetworkedStatsComponent m_Owner
Definition
SCR_BaseNetworkedStat.c:7
SCR_BaseNetworkedStat::m_eStatType
SCR_ENetworkedStatType m_eStatType
Definition
SCR_BaseNetworkedStat.c:5
SCR_BaseNetworkedStat::InvokeStatValueChange
void InvokeStatValueChange()
Definition
SCR_BaseNetworkedStat.c:32
SCR_MemoryNetworkedStat
Definition
SCR_MemoryNetworkedStat.c:3
SCR_MemoryNetworkedStat::OnAuthorityStatValueSet
override void OnAuthorityStatValueSet(int value)
Definition
SCR_MemoryNetworkedStat.c:48
SCR_MemoryNetworkedStat::m_iAuthorityMemory
int m_iAuthorityMemory
Definition
SCR_MemoryNetworkedStat.c:8
SCR_MemoryNetworkedStat::UpdateStat
override void UpdateStat()
Definition
SCR_MemoryNetworkedStat.c:29
SCR_MemoryNetworkedStat::m_iLocalMemory
int m_iLocalMemory
Definition
SCR_MemoryNetworkedStat.c:5
SCR_MemoryNetworkedStat::GetLastCheckedLocalMemory
int GetLastCheckedLocalMemory()
Definition
SCR_MemoryNetworkedStat.c:11
SCR_MemoryNetworkedStat::GetLastCheckedAuthorityMemory
int GetLastCheckedAuthorityMemory()
Definition
SCR_MemoryNetworkedStat.c:20
System
Definition
System.c:13
RplRole
RplRole
Role of replicated node (and all items in it) within the replication system.
Definition
RplRole.c:14
scripts
Game
Network
NetworkedStats
Stats
SCR_MemoryNetworkedStat.c
Generated by
1.17.0