diff --git a/engine/common/common.h b/engine/common/common.h index d91b1df4..e476723d 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -523,7 +523,7 @@ qboolean Host_IsLocalClient( void ); void Host_ShutdownServer( void ); void Host_Error( const char *error, ... ) _format( 1 ); void Host_ValidateEngineFeatures( uint32_t features ); -void Host_Frame( float time ); +void Host_Frame( double time ); void Host_Credits( void ); // @@ -534,7 +534,7 @@ void COM_NewGame( char const *pMapName ); void COM_LoadLevel( char const *pMapName, qboolean background ); void COM_LoadGame( char const *pSaveFileName ); void COM_ChangeLevel( char const *pNewLevel, char const *pLandmarkName, qboolean background ); -void COM_Frame( float time ); +void COM_Frame( double time ); /* ============================================================== diff --git a/engine/common/filesystem_engine.c b/engine/common/filesystem_engine.c index 9d9a167e..2457b0cc 100644 --- a/engine/common/filesystem_engine.c +++ b/engine/common/filesystem_engine.c @@ -257,7 +257,3 @@ void FS_Shutdown( void ) FS_UnloadProgs(); } - - - - diff --git a/engine/common/host.c b/engine/common/host.c index 1576d7d5..e5169a00 100644 --- a/engine/common/host.c +++ b/engine/common/host.c @@ -763,7 +763,7 @@ Host_FilterTime Returns false if the time is too short to run a frame =================== */ -static qboolean Host_FilterTime( float time ) +static qboolean Host_FilterTime( double time ) { static double oldtime; double dt; @@ -793,9 +793,9 @@ static qboolean Host_FilterTime( float time ) Host_Frame ================= */ -void Host_Frame( float time ) +void Host_Frame( double time ) { - double t1, t2; + double t1; // decide the simulation time if( !Host_FilterTime( time )) @@ -813,11 +813,8 @@ void Host_Frame( float time ) Host_ClientFrame (); // client frame HTTP_Run(); // both server and client - t2 = Sys_DoubleTime(); - - host.pureframetime = t2 - t1; - host.framecount++; + host.pureframetime = Sys_DoubleTime() - t1; } /* diff --git a/engine/common/host_state.c b/engine/common/host_state.c index 99d6dd02..a25f6591 100644 --- a/engine/common/host_state.c +++ b/engine/common/host_state.c @@ -137,7 +137,7 @@ static void Host_ShutdownGame( void ) } } -static void Host_RunFrame( float time ) +static void Host_RunFrame( double time ) { // at this time, we don't need to get events from OS on dedicated #if !XASH_DEDICATED @@ -168,7 +168,7 @@ static void Host_RunFrame( float time ) } } -void COM_Frame( float time ) +void COM_Frame( double time ) { int loopCount = 0;