engine: host: only sleep once between frames

This commit is contained in:
Alibek Omarov 2022-11-10 12:42:48 +03:00
parent ef74f86ce2
commit f469b56b93
1 changed files with 9 additions and 1 deletions

View File

@ -675,11 +675,19 @@ Host_Frame
*/
void Host_Frame( float time )
{
Host_CheckSleep();
static qboolean slept = false;
// decide the simulation time
if( !Host_FilterTime( time ))
{
if( !slept )
{
Host_CheckSleep();
slept = true;
}
return;
}
slept = false;
Host_InputFrame (); // input frame
Host_ClientBegin (); // begin client