Browse Source

engine: host: only sleep once between frames

pull/2/head
Alibek Omarov 2 years ago
parent
commit
f469b56b93
  1. 10
      engine/common/host.c

10
engine/common/host.c

@ -675,11 +675,19 @@ Host_Frame @@ -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

Loading…
Cancel
Save