Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
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")]
6{
7 [Attribute("1", desc: "How often is info about serevr broadcasted.")]
8 protected float m_fInterval;
9
11
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};
ArmaReforgerScripted GetGame()
Definition game.c:1398
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void Rpc(func method, void p0=NULL, void p1=NULL, void p2=NULL, void p3=NULL, void p4=NULL, void p5=NULL, void p6=NULL, void p7=NULL)
void SCR_BaseEditorComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void Receive(int fps, int memoryKB, int tickCount)
SCR_FieldOfViewSettings Attribute
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
Definition EnNetwork.c:95
RplRcver
Definition RplRcver.c:59
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.
Definition RplChannel.c:14
ScriptInvokerBase< func > ScriptInvoker
Definition tools.c:134