big refactor, WIP!
This commit is contained in:
38
framework/performance/functions/fn_addClientStatsPFH.sqf
Normal file
38
framework/performance/functions/fn_addClientStatsPFH.sqf
Normal file
@@ -0,0 +1,38 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
[
|
||||
LEVEL_INFO,
|
||||
QUOTE(COMPONENT),
|
||||
"Initializing client stats PFH",
|
||||
[]
|
||||
] call EFUNC(common,log);
|
||||
|
||||
_cpsPFH = [
|
||||
{
|
||||
[] call FUNC(calculateClientStats);
|
||||
},
|
||||
QGVAR(client_cps_interval) call CBA_settings_fnc_get,
|
||||
[],
|
||||
{
|
||||
[
|
||||
LEVEL_INFO,
|
||||
QUOTE(COMPONENT),
|
||||
"Client PFH loaded",
|
||||
[["pfhInterval", QGVAR(client_cps_interval) call CBA_settings_fnc_get]]
|
||||
] call EFUNC(common,log);
|
||||
},
|
||||
{ [
|
||||
LEVEL_INFO,
|
||||
QUOTE(COMPONENT),
|
||||
"Client PFH unloaded",
|
||||
[]
|
||||
] call EFUNC(common,log);
|
||||
},
|
||||
{ QGVAR(client_cps_enable) call CBA_settings_fnc_get },
|
||||
{ false },
|
||||
[]
|
||||
] call CBA_fnc_createPerFrameHandlerObject;
|
||||
|
||||
player setVariable [QGVAR(client_cps_handler), _cpsPFH];
|
||||
Reference in New Issue
Block a user