From f469b56b93d712db502477604b629a30f6c18a3d Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 10 Nov 2022 12:42:48 +0300 Subject: [PATCH] engine: host: only sleep once between frames --- engine/common/host.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/engine/common/host.c b/engine/common/host.c index 9dc606e3..48df08dd 100644 --- a/engine/common/host.c +++ b/engine/common/host.c @@ -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