Files
DayZ-Epoch/SQF/dayz_code/system/scheduler/sched_oneachframe.sqf
ebayShopper 2cb55d85cd Don't show low FPS hint when map is open
FPS is automatically capped on map display.
2016-11-29 11:10:00 -05:00

38 lines
853 B
Plaintext

// (c) facoptere@gmail.com, licensed to DayZMod for the community
// detect low FPS
// in case of player "lag" (fps_min very low), all other scheduler tasks are suspended during 50 frames
sched_onEachFrame_init = {
sched_ef_lowFPSctr=0;
objNull
};
sched_onEachFrame = {
private ["_ret"];
_ret = (1==0);
if (diag_fpsmin < 10) then {
sched_ef_lowFPSctr = sched_ef_lowFPSctr +1;
if (sched_ef_lowFPSctr < 50) then {
_ret = (1==1);
}
}
else {
if (sched_ef_lowFPSctr == 1) then { hintSilent ""; };
sched_ef_lowFPSctr = 0 max (sched_ef_lowFPSctr -1);
};
if (sched_ef_lowFPSctr >= 100) then {
sched_ef_lowFPSctr = 2;
if (!visibleMap) then {
hintSilent localize "str_player_lowPFS";
diag_log format [ "h1nt: LOW FPS (%1)", diag_fpsmin ];
};
};
if (!isNil "dayz_groupIcons") then {call dayz_groupIcons;};
_ret
};