5 protected int m_iLocalMemory;
8 protected int m_iAuthorityMemory;
11 int GetLastCheckedLocalMemory()
13 if (m_iLocalMemory == 0)
16 return m_iLocalMemory / 1024;
20 int GetLastCheckedAuthorityMemory()
22 if (m_iAuthorityMemory == 0)
25 return m_iAuthorityMemory / 1024;
29 override void UpdateStat()
31 int localMemory = System.MemoryAllocationKB();
32 if (localMemory == m_iLocalMemory)
35 m_iLocalMemory = localMemory;
37 RplComponent rplComponent =
m_Owner.GetRplComponent();
38 if (rplComponent && rplComponent.Role() == RplRole.Authority)
40 m_iAuthorityMemory = m_iLocalMemory;
41 m_Owner.SetAuthorityStatValue(m_eStatType, m_iAuthorityMemory);
44 InvokeStatValueChange();
48 override void OnAuthorityStatValueSet(
int value)
50 m_iAuthorityMemory = value;
51 InvokeStatValueChange();