ready for dedi -- improvements to resupply, triageIcons too

This commit is contained in:
2024-02-06 17:36:01 -08:00
parent 0a64d9e170
commit 91b982e06e
44 changed files with 586 additions and 354 deletions

View File

@@ -10,13 +10,8 @@
_counter = _counter + 1;
};
// in an empty mission, the _counter may go well over 2000 times per frame!
[
LEVEL_INFO,
QUOTE(COMPONENT),
format ["Average Execution: %1 times per frame", _counter / (diag_frameNo - _frameNo)],
[["playerRawCPS", _counter / (diag_frameNo - _frameNo)]]
] call EFUNC(common,log);
player setVariable [QGVAR(player_raw_cps), _counter / (diag_frameNo - _frameNo), true];
private _rawCPS = _counter / (diag_frameNo - _frameNo);
player setVariable [QGVAR(player_raw_cps), _rawCPS, true];
// with suspension
private _counter = 0;
@@ -28,13 +23,23 @@
uiSleep 0.001; // waits at least 1 frame
};
// _counter says one per frame, as expected
private _playerCPS = _counter / (diag_frameNo - _frameNo);
player setVariable [QGVAR(player_cps), _playerCPS, true];
// log to RPT
[
LEVEL_INFO,
QUOTE(COMPONENT),
format ["Average Execution: %1 times per frame", _counter / (diag_frameNo - _frameNo)],
[["playerCPS", _counter / (diag_frameNo - _frameNo)]]
] call EFUNC(common,log);
player setVariable [QGVAR(player_cps), _counter / (diag_frameNo - _frameNo), true];
{_this call EFUNC(common,log);},
[
LEVEL_INFO,
QUOTE(COMPONENT),
format ["Average Execution: %1 times per frame", _playerCPS],
[
["playerRawCPS", _rawCPS],
["playerCPS", _playerCPS]
]
]
] call CBA_fnc_directCall;
};
nil;