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_NetworkedStatsTest.c
Go to the documentation of this file.
1
[
ComponentEditorProps
(
category
:
"GameScripted/Misc"
, description:
""
)]
2
class
SCR_NetworkedStatsTestComponentClass
:
ScriptComponentClass
3
{
4
}
5
6
class
SCR_NetworkedStatsTestComponent :
ScriptComponent
7
{
8
SCR_NetworkedStatsComponent
statsComponent
;
9
10
//------------------------------------------------------------------------------------------------
11
override
void
EOnInit
(
IEntity
owner)
12
{
13
if
(
SCR_Global
.
IsEditMode
())
14
return
;
15
16
statsComponent
= SCR_NetworkedStatsComponent.Cast(owner.
FindComponent
(SCR_NetworkedStatsComponent));
17
statsComponent
.GetNetworkedStatPrefabData().GetOnStatsChanged(
true
).Insert(
OnStatUpdate
);
18
}
19
20
//------------------------------------------------------------------------------------------------
22
void
OnStatUpdate
(
SCR_BaseNetworkedStat
stat)
23
{
24
SCR_FPSNetworkedStat
fpsStat =
SCR_FPSNetworkedStat
.Cast(stat);
25
SCR_MemoryNetworkedStat
memoryStat =
SCR_MemoryNetworkedStat
.Cast(stat);
26
27
if
(fpsStat)
28
{
29
Print
(
"Local FPS: "
+ fpsStat.
GetLastCheckedLocalFPS
());
30
Print
(
"Authority FPS: "
+ fpsStat.
GetLastCheckedAuthorityFPS
());
31
}
32
else
if
(memoryStat)
33
{
34
Print
(
"Local Memory: "
+ memoryStat.
GetLastCheckedLocalMemory
());
35
Print
(
"Authority Memory: "
+ memoryStat.
GetLastCheckedAuthorityMemory
());
36
}
37
}
38
39
//------------------------------------------------------------------------------------------------
40
override
void
OnPostInit
(
IEntity
owner)
41
{
42
SetEventMask
(owner,
EntityEvent
.INIT);
43
}
44
}
ComponentEditorProps
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
Definition
SCR_AIGroupUtilityComponent.c:12
statsComponent
SCR_NetworkedStatsTestComponentClass statsComponent
OnStatUpdate
void OnStatUpdate(SCR_BaseNetworkedStat stat)
Definition
SCR_NetworkedStatsTest.c:22
category
params category
Definition
SCR_VehicleDamageManagerComponent.c:302
GenericComponent::SetEventMask
proto external int SetEventMask(notnull IEntity owner, int mask)
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
SCR_BaseNetworkedStat
Definition
SCR_BaseNetworkedStat.c:3
SCR_FPSNetworkedStat
Definition
SCR_ServerFPSNetworkedStat.c:3
SCR_FPSNetworkedStat::GetLastCheckedLocalFPS
int GetLastCheckedLocalFPS()
Definition
SCR_ServerFPSNetworkedStat.c:10
SCR_FPSNetworkedStat::GetLastCheckedAuthorityFPS
int GetLastCheckedAuthorityFPS()
Definition
SCR_ServerFPSNetworkedStat.c:16
SCR_Global
Definition
Functions.c:7
SCR_Global::IsEditMode
static bool IsEditMode()
Definition
Functions.c:1566
SCR_MemoryNetworkedStat
Definition
SCR_MemoryNetworkedStat.c:3
SCR_MemoryNetworkedStat::GetLastCheckedLocalMemory
int GetLastCheckedLocalMemory()
Definition
SCR_MemoryNetworkedStat.c:11
SCR_MemoryNetworkedStat::GetLastCheckedAuthorityMemory
int GetLastCheckedAuthorityMemory()
Definition
SCR_MemoryNetworkedStat.c:20
SCR_NetworkedStatsTestComponentClass
Definition
SCR_NetworkedStatsTest.c:3
ScriptComponentClass
Definition
ScriptComponentClass.c:8
ScriptComponent
Definition
ScriptComponent.c:24
ScriptComponent::EOnInit
void EOnInit(IEntity owner)
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
EntityEvent
EntityEvent
Various entity events.
Definition
EntityEvent.c:14
OnPostInit
@ OnPostInit
Definition
SndComponentCallbacks.c:15
scripts
Game
Network
NetworkedStats
Components
SCR_NetworkedStatsTest.c
Generated by
1.17.0