From afb0540aa3c217be6488a5fa95792ef33a07b05e Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 28 Dec 2023 22:19:32 +0300 Subject: [PATCH] ref: gl: convert to usage of ref_host_t to get real engine time --- ref/gl/gl_alias.c | 2 +- ref/gl/gl_studio.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ref/gl/gl_alias.c b/ref/gl/gl_alias.c index c763c8f7..e203468f 100644 --- a/ref/gl/gl_alias.c +++ b/ref/gl/gl_alias.c @@ -1337,7 +1337,7 @@ static void R_AliasSetupTimings( void ) else { // menu stuff - g_alias.time = gpGlobals->realtime; + g_alias.time = gp_host->realtime; } m_fDoRemap = false; diff --git a/ref/gl/gl_studio.c b/ref/gl/gl_studio.c index 66b3f88a..d5ead206 100644 --- a/ref/gl/gl_studio.c +++ b/ref/gl/gl_studio.c @@ -180,8 +180,8 @@ static void R_StudioSetupTimings( void ) else { // menu stuff - g_studio.time = gpGlobals->realtime; - g_studio.frametime = gpGlobals->frametime; + g_studio.time = gp_host->realtime; + g_studio.frametime = gp_host->frametime; } } @@ -2772,7 +2772,7 @@ static void R_StudioClientEvents( void ) return; end = R_StudioEstimateFrame( e, pseqdesc, g_studio.time ); - start = end - e->curstate.framerate * gpGlobals->frametime * pseqdesc->fps; + start = end - e->curstate.framerate * gp_host->frametime * pseqdesc->fps; pevent = (mstudioevent_t *)((byte *)m_pStudioHeader + pseqdesc->eventindex); if( e->latched.sequencetime == e->curstate.animtime )