Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ServerInfoEditorComponent.c
Go to the documentation of this file.
1 [ComponentEditorProps(category: "GameScripted/Editor", description: "Transmitting info about dedicated server. Works only with SCR_EditorBaseEntity!", icon: "WBData/ComponentEditorProps/componentEditor.png")]
3 {
4 };
6 {
7  [Attribute("1", desc: "How often is info about serevr broadcasted.")]
8  protected float m_fInterval;
9 
10  protected ref ScriptInvoker m_OnReceive = new ScriptInvoker();;
11 
12  ScriptInvoker GetOnReceive()
13  {
14  return m_OnReceive;
15  }
16 
17  protected void Transmit()
18  {
19  int fps = System.GetFPS();
20  int memoryKB = System.MemoryAllocationKB();
21  int tickCount = System.GetTickCount();
22 
23  Rpc(Receive, fps, memoryKB, tickCount);
24  }
25  [RplRpc(RplChannel.Unreliable, RplRcver.Owner)]
26  protected void Receive(int fps, int memoryKB, int tickCount)
27  {
28  m_OnReceive.Invoke(fps, memoryKB, tickCount);
29  }
30 
31  override protected void EOnEditorActivateServer()
32  {
33  GetGame().GetCallqueue().CallLater(Transmit, m_fInterval * 1000, true);
34  }
35  override protected void EOnEditorDeactivateServer()
36  {
37  GetGame().GetCallqueue().Remove(Transmit);
38  }
39 };
ComponentEditorProps
SCR_FragmentEntityClass ComponentEditorProps
SCR_ServerInfoEditorComponentClass
Definition: SCR_ServerInfoEditorComponent.c:2
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
RplRpc
SCR_AchievementsHandlerClass ScriptComponentClass RplRpc(RplChannel.Reliable, RplRcver.Owner)] void UnlockOnClient(AchievementId achievement)
Definition: SCR_AchievementsHandler.c:11
SCR_BaseEditorComponent
Definition: SCR_BaseEditorComponent.c:119
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_BaseEditorComponentClass
Definition: SCR_BaseEditorComponent.c:2
SCR_ServerInfoEditorComponent
Definition: SCR_ServerInfoEditorComponent.c:5
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180