Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ServerFPSNetworkedStat.c
Go to the documentation of this file.
3 {
4  // Last checked local FPS.
5  protected int m_iLocalFPS;
6  // Last checked authority FPS.
7  protected int m_iAuthorityFPS;
8 
9  //------------------------------------------------------------------------------------------------
10  int GetLastCheckedLocalFPS()
11  {
12  return m_iLocalFPS;
13  }
14 
15  //------------------------------------------------------------------------------------------------
16  int GetLastCheckedAuthorityFPS()
17  {
18  return m_iAuthorityFPS;
19  }
20 
21  //------------------------------------------------------------------------------------------------
22  override void UpdateStat()
23  {
24  int localFPS = System.GetFPS();
25  if (localFPS == m_iLocalFPS)
26  return;
27 
28  m_iLocalFPS = localFPS;
29  UpdateStatValueIfAuthority();
30  InvokeStatValueChange();
31  }
32 
33  //------------------------------------------------------------------------------------------------
34  protected void UpdateStatValueIfAuthority()
35  {
36  RplComponent rplComponent = m_Owner.GetRplComponent();
37  if (!rplComponent || rplComponent.Role() != RplRole.Authority)
38  return;
39 
40  m_iAuthorityFPS = m_iLocalFPS;
41  m_Owner.SetAuthorityStatValue(m_eStatType, m_iAuthorityFPS);
42  }
43 
44  //------------------------------------------------------------------------------------------------
45  override void OnAuthorityStatValueSet(int value)
46  {
47  m_iAuthorityFPS = value;
48  InvokeStatValueChange();
49  }
50 }
SCR_FPSNetworkedStat
Definition: SCR_ServerFPSNetworkedStat.c:2
SCR_BaseNetworkedStat
Definition: SCR_BaseNetworkedStat.c:2
m_Owner
SCR_AIGroupUtilityComponentClass m_Owner
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468