Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(isServer) then {
- diag_log "TAW_DATA_PLAYER_FPS: 'serverTime', 'profileName', 'fpsAvg', 'fpsMin'";
- diag_log "TAW_DATA_JOINED: 'serverTime', 'profileName', 'count_activatedAddons'";
- diag_log "TAW_DATA_MISSION: 'serverTime', 'count_allPlayers', 'count_allUnits', 'count_playableUnits', 'count_allMissionObjects'";
- diag_log "TAW_DATA_PLAYER: 'serverTime', 'profileName', 'viewDistance', 'objectDistance', 'shadowDistance', 'terrainGrid', 'count_localUnits', 'playerFatigue', 'playerDistanceMoved', 'playerRating', 'scriptsSpawn', 'scriptsExecVM', 'scriptsExec', 'scriptsExecFSM'";
- receiveFpsData = {
- params [
- "_profileName",
- "_data"
- ];
- {
- _x params [
- "_serverTime",
- "_fps",
- "_fpsMin"
- ];
- diag_log format[
- "TAW_DATA_PLAYER_FPS: %1, '%2', %3, %4",
- _serverTime,
- _profileName,
- _fps,
- _fpsMin
- ];
- } forEach _data;
- };
- rceiveJoinedData = {
- private _data = ["TAW_DATA_JOINED: %1, '%2', %3"];
- _data append _this;
- diag_log format _data;
- };
- receivePlayerData = {
- private _data = ["TAW_DATA_PLAYER: %1, '%2', %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13"];
- _data append _this;
- diag_log format _data;
- };
- };
- [] spawn {
- private _data = [];
- _data = [
- round serverTime,
- profileName,
- count activatedAddons
- ];
- [
- _data,
- "rceiveJoinedData",
- false // execute on server only
- ] call BIS_fnc_MP;
- private _nextSendData = 0;
- private _nextFrame = 0;
- private _count = 0;
- private _fps = 0;
- private _fpsMin = 0;
- private _sendDataTime = 0;
- while{true} do {
- _data = [];
- _nextSendData = serverTime + 60;
- while{serverTime < _nextSendData} do {
- _count = 0;
- _fps = 0;
- _fpsMin = 0;
- _sendDataTime = serverTime + 1;
- while{serverTime <= _sendDataTime} do {
- _count = _count + 1;
- _fps = _fps + diag_fps;
- _fpsMin = _fpsMin + diag_fps;
- _nextFrame = diag_frameNo + 16;
- waitUntil{diag_frameNo <= _nextFrame};
- };
- if(_count > 0) then {
- _data pushBack [
- serverTime,
- _fps / _count,
- _fpsMin / _count
- ];
- };
- };
- [
- [profileName, _data],
- "receiveFpsData",
- false // execute on server only
- ] call BIS_fnc_MP;
- };
- };
- [] spawn {
- private _data = [];
- private _lastPosition = [];
- while{true} do {
- if(isServer) then {
- diag_log format[
- "TAW_DATA_MISSION: %1, %2, %3, %4, %5",
- round serverTime,
- count allPlayers,
- count allUnits,
- count playableUnits,
- count allMissionObjects ""
- ];
- };
- if(!isNil{player} && {player == player}) then {
- if(count _lastPosition == 0) then {
- _lastPosition = getPosASL player;
- };
- getObjectViewDistance params [
- "_objectDistance",
- "_shadowDistance"
- ];
- _data = [
- round serverTime,
- profileName,
- viewDistance,
- _objectDistance,
- _shadowDistance,
- getTerrainGrid,
- {local _x} count allUnits,
- getFatigue player,
- _lastPosition distance getPosASL player, // distance moved
- rating player
- ];
- _data append diag_activeScripts;
- _lastPosition = getPosASL player;
- [
- _data,
- "receivePlayerData",
- false // execute on server only
- ] call BIS_fnc_MP;
- };
- sleep 60;
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment